import Mathlib.Data.Vector import Mathlib.Data.Bitvec.Basic import Mathlib.Algebra.Group.InjSurj import Mathlib.Tactic.Ring import Mathlib.Data.Int.Cast.Lemmas import Mathlib.Data.ZMod.Basic namespace Vector instance {Ξ± :Ξ±: Type uType u} {Type u: Type (u+1)n :n: βNat} : GetElem (VectorNat: TypeΞ±Ξ±: Type un) (Finn: βn)n: βΞ± (funΞ±: Type u__: ?m.11_ =>_: ?m.14True) where getElem := funTrue: Propvv: ?m.45ii: ?m.48_ =>_: ?m.51v.1[v: ?m.45i.val] @[simp] theorem getElem_eq_get {i: ?m.48Ξ± :Ξ±: Type uType u} {Type u: Type (u+1)n :n: βNat} (Nat: Typev : Vectorv: Vector Ξ± nΞ±Ξ±: Type un) (n: βi : Fini: Fin nn) :n: βv[v: Vector Ξ± ni] =i: Fin nv.getv: Vector Ξ± ni := rfl end Vector namespace Bitvec def width : Bitveci: Fin nn βn: ?m.869Nat := funNat: Type_ =>_: ?m.877n -- Shouldn't this be inferred from the instance above? (as Bitvec is @[reducible]) instance {n: βn :n: βNat} : GetElem (BitvecNat: Typen) (Finn: βn)n: βBool (funBool: Type__: ?m.919_ =>_: ?m.922True) where getElem := funTrue: Propvv: ?m.948ii: ?m.951_ =>_: ?m.954v.1[v: ?m.948i.val] instance (i: ?m.951n :n: βNat) : Inhabited (BitvecNat: Typen) := β¨List.replicaten: βnn: βtrue,true: BoolGoals accomplished! πn: βList.length (List.replicate n true) = nβ© defGoals accomplished! πFun (Fun: (width : β) β ?m.1584 widthwidth :width: βNat) := FinNat: Typewidth βwidth: βBool def ofInt' (Bool: Typen :n: βNat) (Nat: Typez :z: β€Int) : BitvecInt: Typen := matchn: βn with |n: β0 => β¨List.nil, rflβ© |0: βm + 1 => Bitvec.ofIntm: βmm: βz /-- convert `Bitvec n` to `Fin n β Bool` -/ def ofFun {z: β€width :width: βNat} : FunNat: Typewidth β Bitvecwidth: βwidth := Vector.ofFn /-- convert `Fin n β Bool` to `Bitvec n` -/ def toFun {width: βwidth :width: βNat} : BitvecNat: Typewidth β Funwidth: βwidth := Vector.get instance {width: βwidth :width: βNat} :Nat: TypeCoe (FunCoe: semiOutParam (Sort ?u.2016) β Sort ?u.2015 β Sort (max(max1?u.2016)?u.2015)width) (Bitvecwidth: βwidth) := β¨@ofFunwidth: βwidthβ© instance {width: βwidth :width: βNat} :Nat: TypeCoe (BitvecCoe: semiOutParam (Sort ?u.2097) β Sort ?u.2096 β Sort (max(max1?u.2097)?u.2096)width) (Funwidth: βwidth) := β¨@toFunwidth: βwidthβ© def ofVector : Vectorwidth: βBoolBool: Typen β Bitvecn: ?m.2175n :=n: ?m.2175id -- inspired by: https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Defining.20my.20own.20numerals -- not ideal solution, as hard to type, but should be ok for now prefix:max "πΆ" => fun v => ofVector (Vector.consid: {Ξ± : Sort ?u.2185} β Ξ± β Ξ±false v) prefix:max "π·" => fun v => ofVector (Vector.consfalse: Booltrue v) notation:max "πΆ" => ofVector (Vector.construe: Boolfalse (@Vector.nilfalse: BoolBool)) notation:max "π·" => ofVector (Vector.consBool: Typetrue (@Vector.niltrue: BoolBool)) instance : Add (BitvecBool: Typen) where add := Bitvec.add instance : Sub (Bitvecn: ?m.125043n) where sub := Bitvec.sub -- examples: -- #eval (π·πΆπ·π·).toNat -- #eval (πΆπ·π·π·).toNat -- #eval (πΆπ·π·π·) + (π·πΆπ·π·) |>.toNat -- #eval π·πΆπ·π· + πΆπ·π·π· -- #eval Bitvec.adc (π·πΆπ·π·) (πΆπ·π·π·) true -- #eval Bitvec.adc (π·πΆπ·π·) (πΆπ·π·π·) false -- #eval Bitvec.adc (π·πΆπ·π·) (πΆπ·π·π·) true |>.toNat -- #eval Bitvec.adc (π·πΆπ·π·) (πΆπ·π·π·) false |>.toNat -- -- #eval Bitvec.adc (πΆ) (πΆ) true -- #eval Bitvec.adc (πΆ) (πΆ) false def toZMod {n: ?m.125137n :n: βNat} (Nat: Typex : Bitvecx: Bitvec nn) : ZMod (n: β2 ^2: ?m.125237n) :=n: βx.toNat theorem toZMod_val {x: Bitvec nn :n: ββ} (β: Typev : Bitvecv: Bitvec nn) : (toZModn: βv).val =v: Bitvec nv.toNat :=v: Bitvec nGoals accomplished! πZMod.val β(Bitvec.toNat v) = Bitvec.toNat vBitvec.toNat v % 2 ^ n = Bitvec.toNat vBitvec.toNat v < 2 ^ nBitvec.toNat v < 2 ^ ndef ofZMod {Goals accomplished! πn :n: ββ} (x : ZMod (β: Type2 ^2: ?m.125994n)) : Bitvecn: βn := Bitvec.ofNatn: β_ x.val theorem toZMod_ofZMod {_: βn} (i : ZMod <|n: ?m.1261512 ^2: ?m.126158n) : (ofZMod i).toZMod = i :=n: ?m.126151ZMod.val_injectiveZMod.val_injective: β (n : β) [inst : NeZero n], Function.Injective ZMod.val_ (_: βGoals accomplished! π) theorem ofZMod_toZMod {Goals accomplished! πn} (n: βv : Bitvecv: Bitvec nn) : ofZMod (toZModn: ?m.126550v) =v: Bitvec nv :=v: Bitvec nGoals accomplished! πBitvec.ofNat n (Bitvec.toNat v) = vtheoremGoals accomplished! πfoldl_addLsb_add : β (foldl_addLsb_add: β (n k : β) (x : List Bool), List.foldl addLsb (n + k) x = 2 ^ List.length x * k + List.foldl addLsb n xnn: βk :k: ββ) (x : Listβ: TypeBool), x.foldl addLsb (Bool: Typen +n: βk) =k: β2 ^ x.length *2: ?m.126703k + x.foldl addLsbk: βn |n: βn,n: βk, [] =>k: βGoals accomplished! πn, k: βList.foldl addLsb (n + k) [] = 2 ^ List.length [] * k + List.foldl addLsb n []|Goals accomplished! πn,n: βk,k: βa::l =>a: BoolGoals accomplished! πGoals accomplished! πGoals accomplished! πtheoremGoals accomplished! πfoldl_addLsb_eq_add_foldl_addLsb_zero (x : Listfoldl_addLsb_eq_add_foldl_addLsb_zero: β (x : List Bool) (k : β), List.foldl addLsb k x = 2 ^ List.length x * k + List.foldl addLsb 0 xBool) (Bool: Typek :k: ββ) : x.foldl addLsbβ: Typek =k: β2 ^ x.length *2: ?m.129363k + x.foldl addLsbk: β0 :=0: ?m.129392Goals accomplished! πList.foldl addLsb k x = 2 ^ List.length x * k + List.foldl addLsb 0 xList.foldl addLsb k x = 2 ^ List.length x * k + List.foldl addLsb 0 xList.foldl addLsb k x = List.foldl addLsb (0 + k) xList.foldl addLsb k x = 2 ^ List.length x * k + List.foldl addLsb 0 xList.foldl addLsb k x = List.foldl addLsb k xtheoremGoals accomplished! πfoldl_addLsb_cons_zero (foldl_addLsb_cons_zero: β (a : Bool) (x : List Bool), List.foldl addLsb 0 (a :: x) = (2 ^ List.length x * bif a then 1 else 0) + List.foldl addLsb 0 xa :a: BoolBool) (x : ListBool: TypeBool) : (Bool: Typea::x).a: Boolfoldl addLsb0 =0: ?m.1297072^x.length * cond2: ?m.129727aa: Bool11: ?m.1297430 + x.foldl addLsb0: ?m.1297530 := calc (0: ?m.129776a::x).a: Boolfoldl addLsb0 = x.foldl addLsb (0: ?m.1299440 +0: ?m.1299680 + cond0: ?m.129979aa: Bool11: ?m.1299920) := rfl0: ?m.130002_ =_: ?mβ_ :=_: ?m.130127Goals accomplished! πList.foldl addLsb (0 + 0 + bif a then 1 else 0) x = (2 ^ List.length x * bif a then 1 else 0) + List.foldl addLsb 0 xList.foldl addLsb (0 + 0 + bif a then 1 else 0) x = (2 ^ List.length x * bif a then 1 else 0) + List.foldl addLsb 0 x(2 ^ List.length x * bif a then 1 else 0) + List.foldl addLsb (0 + 0) x = (2 ^ List.length x * bif a then 1 else 0) + List.foldl addLsb 0 xtheoremGoals accomplished! πtoNat_adc_aux : β {x y: ListtoNat_adc_aux: β {x y : List Bool}, List.length x = List.length y β List.foldl addLsb (addLsb 0 (List.mapAccumrβ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) x y false).fst) (List.mapAccumrβ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) x y false).snd = List.foldl addLsb 0 x + List.foldl addLsb 0 yBool} (Bool: Type_h : List.length x = List.length y), List.foldl addLsb (addLsb_h: List.length x = List.length y0 (List.mapAccumrβ (fun0: ?m.130262xx: ?m.130281yy: ?m.130284c => (Bitvec.carryc: ?m.130287xx: ?m.130281yy: ?m.130284c, Bitvec.xor3c: ?m.130287xx: ?m.130281yy: ?m.130284c)) x yc: ?m.130287false).fst) (List.mapAccumrβ (funfalse: Boolxx: ?m.130318yy: ?m.130321c => (Bitvec.carryc: ?m.130324xx: ?m.130318yy: ?m.130321c, Bitvec.xor3c: ?m.130324xx: ?m.130318yy: ?m.130321c)) x yc: ?m.130324false).snd = List.foldl addLsbfalse: Bool0 x + List.foldl addLsb0: ?m.1303580 y | [], [], _ => rfl |0: ?m.130371a::x,a: Boolb::y,b: Boolh =>h: List.length (a :: x) = List.length (b :: y)Goals accomplished! πList.foldl addLsb (addLsb 0 (List.mapAccumrβ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).fst) (List.mapAccumrβ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).snd = List.foldl addLsb 0 (a :: x) + List.foldl addLsb 0 (b :: y)List.foldl addLsb (addLsb 0 (List.mapAccumrβ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).fst) (List.mapAccumrβ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).snd = List.foldl addLsb 0 (a :: x) + List.foldl addLsb 0 (b :: y)List.foldl addLsb (addLsb 0 (List.mapAccumrβ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).fst) (List.mapAccumrβ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).snd = List.foldl addLsb 0 (a :: x) + List.foldl addLsb 0 (b :: y)List.foldl addLsb (addLsb 0 (List.mapAccumrβ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).fst) (List.mapAccumrβ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).snd = List.foldl addLsb 0 (a :: x) + List.foldl addLsb 0 (b :: y)List.foldl addLsb (addLsb 0 (List.mapAccumrβ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).fst) (List.mapAccumrβ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).snd = (2 ^ List.length x * bif a then 1 else 0) + List.foldl addLsb 0 x + List.foldl addLsb 0 (b :: y)List.foldl addLsb (addLsb 0 (List.mapAccumrβ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).fst) (List.mapAccumrβ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).snd = List.foldl addLsb 0 (a :: x) + List.foldl addLsb 0 (b :: y)List.foldl addLsb (addLsb 0 (List.mapAccumrβ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).fst) (List.mapAccumrβ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).snd = (2 ^ List.length x * bif a then 1 else 0) + List.foldl addLsb 0 x + ((2 ^ List.length y * bif b then 1 else 0) + List.foldl addLsb 0 y)List.foldl addLsb (addLsb 0 (List.mapAccumrβ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).fst) (List.mapAccumrβ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).snd = List.foldl addLsb 0 (a :: x) + List.foldl addLsb 0 (b :: y)List.foldl addLsb (addLsb 0 (List.mapAccumrβ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).fst) (List.mapAccumrβ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).snd = ((2 ^ List.length x * bif a then 1 else 0) + 2 ^ List.length y * bif b then 1 else 0) + (List.foldl addLsb 0 x + List.foldl addLsb 0 y)List.foldl addLsb (addLsb 0 (List.mapAccumrβ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).fst) (List.mapAccumrβ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).snd = List.foldl addLsb 0 (a :: x) + List.foldl addLsb 0 (b :: y)List.foldl addLsb (addLsb 0 (List.mapAccumrβ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).fst) (List.mapAccumrβ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).snd = ((2 ^ List.length x * bif a then 1 else 0) + 2 ^ List.length y * bif b then 1 else 0) + List.foldl addLsb (addLsb 0 (List.mapAccumrβ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) x y false).fst) (List.mapAccumrβ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) x y false).sndList.foldl addLsb (addLsb 0 (List.mapAccumrβ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).fst) (List.mapAccumrβ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).snd = List.foldl addLsb 0 (a :: x) + List.foldl addLsb 0 (b :: y)List.foldl addLsb (addLsb 0 (let r := List.mapAccumrβ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) x y false; let q := (Bitvec.carry a b r.fst, Bitvec.xor3 a b r.fst); (q.fst, q.snd :: r.snd)).fst) (let r := List.mapAccumrβ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) x y false; let q := (Bitvec.carry a b r.fst, Bitvec.xor3 a b r.fst); (q.fst, q.snd :: r.snd)).snd = ((2 ^ List.length x * bif a then 1 else 0) + 2 ^ List.length y * bif b then 1 else 0) + List.foldl addLsb (addLsb 0 (List.mapAccumrβ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) x y false).fst) (List.mapAccumrβ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) x y false).sndList.foldl addLsb (addLsb 0 (let r := List.mapAccumrβ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) x y false; let q := (Bitvec.carry a b r.fst, Bitvec.xor3 a b r.fst); (q.fst, q.snd :: r.snd)).fst) (let r := List.mapAccumrβ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) x y false; let q := (Bitvec.carry a b r.fst, Bitvec.xor3 a b r.fst); (q.fst, q.snd :: r.snd)).snd = ((2 ^ List.length x * bif a then 1 else 0) + 2 ^ List.length y * bif b then 1 else 0) + List.foldl addLsb (addLsb 0 (List.mapAccumrβ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) x y false).fst) (List.mapAccumrβ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) x y false).sndList.foldl addLsb (addLsb 0 (List.mapAccumrβ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).fst) (List.mapAccumrβ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).snd = List.foldl addLsb 0 (a :: x) + List.foldl addLsb 0 (b :: y)List.foldl addLsb (addLsb 0 (a && b || a && (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst || b && (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst)) (xor (xor a b) (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) = ((2 ^ List.length x * bif a then 1 else 0) + 2 ^ List.length y * bif b then 1 else 0) + List.foldl addLsb (addLsb 0 (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst) (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).sndList.foldl addLsb (addLsb 0 (List.mapAccumrβ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).fst) (List.mapAccumrβ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).snd = List.foldl addLsb 0 (a :: x) + List.foldl addLsb 0 (b :: y)List.foldl addLsb (addLsb 0 (a && b || a && (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst || b && (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst)) (xor (xor a b) (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) = ((2 ^ List.length x * bif a then 1 else 0) + 2 ^ List.length y * bif b then 1 else 0) + List.foldl addLsb (addLsb 0 (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst) (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd2 ^ List.length (xor (xor a b) (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) * addLsb 0 (a && b || a && (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst || b && (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst) + List.foldl addLsb 0 (xor (xor a b) (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) = ((2 ^ List.length x * bif a then 1 else 0) + 2 ^ List.length y * bif b then 1 else 0) + List.foldl addLsb (addLsb 0 (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst) (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).sndList.foldl addLsb (addLsb 0 (a && b || a && (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst || b && (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst)) (xor (xor a b) (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) = ((2 ^ List.length x * bif a then 1 else 0) + 2 ^ List.length y * bif b then 1 else 0) + List.foldl addLsb (addLsb 0 (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst) (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd2 ^ List.length (xor (xor a b) (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) * addLsb 0 (a && b || a && (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst || b && (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst) + ((2 ^ List.length (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor a b) (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) = ((2 ^ List.length x * bif a then 1 else 0) + 2 ^ List.length y * bif b then 1 else 0) + List.foldl addLsb (addLsb 0 (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst) (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).sndList.foldl addLsb (addLsb 0 (a && b || a && (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst || b && (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst)) (xor (xor a b) (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) = ((2 ^ List.length x * bif a then 1 else 0) + 2 ^ List.length y * bif b then 1 else 0) + List.foldl addLsb (addLsb 0 (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst) (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd2 ^ List.length (xor (xor a b) (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) * addLsb 0 (a && b || a && (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst || b && (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst) + ((2 ^ List.length (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor a b) (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) = ((2 ^ List.length x * bif a then 1 else 0) + 2 ^ List.length y * bif b then 1 else 0) + (2 ^ List.length (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd * addLsb 0 (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst + List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd)2 ^ List.length (xor (xor a b) (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) * addLsb 0 (a && b || a && (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst || b && (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst) + ((2 ^ List.length (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor a b) (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) = ((2 ^ List.length x * bif a then 1 else 0) + 2 ^ List.length y * bif b then 1 else 0) + (2 ^ List.length (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd * addLsb 0 (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst + List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd)List.foldl addLsb (addLsb 0 (List.mapAccumrβ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).fst) (List.mapAccumrβ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).snd = List.foldl addLsb 0 (a :: x) + List.foldl addLsb 0 (b :: y)
false2 ^ List.length (xor (xor false b) (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) * addLsb 0 (false && b || false && (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst || b && (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst) + ((2 ^ List.length (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor false b) (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) = ((2 ^ List.length x * bif false then 1 else 0) + 2 ^ List.length y * bif b then 1 else 0) + (2 ^ List.length (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd * addLsb 0 (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst + List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd)
true2 ^ List.length (xor (xor true b) (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) * addLsb 0 (true && b || true && (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst || b && (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst) + ((2 ^ List.length (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor true b) (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) = ((2 ^ List.length x * bif true then 1 else 0) + 2 ^ List.length y * bif b then 1 else 0) + (2 ^ List.length (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd * addLsb 0 (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst + List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd)2 ^ List.length (xor (xor a b) (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) * addLsb 0 (a && b || a && (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst || b && (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst) + ((2 ^ List.length (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor a b) (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) = ((2 ^ List.length x * bif a then 1 else 0) + 2 ^ List.length y * bif b then 1 else 0) + (2 ^ List.length (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd * addLsb 0 (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst + List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd)
false2 ^ List.length (xor (xor false b) (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) * addLsb 0 (false && b || false && (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst || b && (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst) + ((2 ^ List.length (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor false b) (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) = ((2 ^ List.length x * bif false then 1 else 0) + 2 ^ List.length y * bif b then 1 else 0) + (2 ^ List.length (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd * addLsb 0 (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst + List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd)
true2 ^ List.length (xor (xor true b) (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) * addLsb 0 (true && b || true && (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst || b && (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst) + ((2 ^ List.length (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor true b) (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) = ((2 ^ List.length x * bif true then 1 else 0) + 2 ^ List.length y * bif b then 1 else 0) + (2 ^ List.length (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd * addLsb 0 (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst + List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd)2 ^ List.length (xor (xor a b) (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) * addLsb 0 (a && b || a && (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst || b && (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst) + ((2 ^ List.length (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor a b) (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) = ((2 ^ List.length x * bif a then 1 else 0) + 2 ^ List.length y * bif b then 1 else 0) + (2 ^ List.length (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd * addLsb 0 (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst + List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd)
true.false2 ^ List.length (xor (xor true false) (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) * addLsb 0 (true && false || true && (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst || false && (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst) + ((2 ^ List.length (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor true false) (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) = ((2 ^ List.length x * bif true then 1 else 0) + 2 ^ List.length y * bif false then 1 else 0) + (2 ^ List.length (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd * addLsb 0 (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst + List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd)
true.true2 ^ List.length (xor (xor true true) (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) * addLsb 0 (true && true || true && (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst || true && (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst) + ((2 ^ List.length (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor true true) (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) = ((2 ^ List.length x * bif true then 1 else 0) + 2 ^ List.length y * bif true then 1 else 0) + (2 ^ List.length (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd * addLsb 0 (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst + List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd)2 ^ List.length (xor (xor a b) (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) * addLsb 0 (a && b || a && (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst || b && (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst) + ((2 ^ List.length (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor a b) (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) = ((2 ^ List.length x * bif a then 1 else 0) + 2 ^ List.length y * bif b then 1 else 0) + (2 ^ List.length (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd * addLsb 0 (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst + List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd)
false.false2 ^ List.length (xor (xor false false) (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) * addLsb 0 (false && false || false && (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst || false && (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst) + ((2 ^ List.length (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor false false) (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) = ((2 ^ List.length x * bif false then 1 else 0) + 2 ^ List.length y * bif false then 1 else 0) + (2 ^ List.length (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd * addLsb 0 (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst + List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd)
false.true2 ^ List.length (xor (xor false true) (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) * addLsb 0 (false && true || false && (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst || true && (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst) + ((2 ^ List.length (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor false true) (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) = ((2 ^ List.length x * bif false then 1 else 0) + 2 ^ List.length y * bif true then 1 else 0) + (2 ^ List.length (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd * addLsb 0 (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst + List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd)
true.false2 ^ List.length (xor (xor true false) (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) * addLsb 0 (true && false || true && (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst || false && (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst) + ((2 ^ List.length (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor true false) (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) = ((2 ^ List.length x * bif true then 1 else 0) + 2 ^ List.length y * bif false then 1 else 0) + (2 ^ List.length (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd * addLsb 0 (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst + List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd)
true.true2 ^ List.length (xor (xor true true) (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) * addLsb 0 (true && true || true && (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst || true && (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst) + ((2 ^ List.length (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor true true) (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) = ((2 ^ List.length x * bif true then 1 else 0) + 2 ^ List.length y * bif true then 1 else 0) + (2 ^ List.length (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd * addLsb 0 (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst + List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd)2 ^ List.length (xor (xor a b) (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) * addLsb 0 (a && b || a && (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst || b && (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst) + ((2 ^ List.length (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor a b) (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) = ((2 ^ List.length x * bif a then 1 else 0) + 2 ^ List.length y * bif b then 1 else 0) + (2 ^ List.length (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd * addLsb 0 (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst + List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd)
false.true(2 ^ List.length y * bif (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor x (xor y c))) x y false).fst then 0 else 1) + ((2 ^ List.length y * bif (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor x (xor y c))) x y false).fst then 1 else 0) + ((2 ^ List.length y * bif (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor x (xor y c))) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor x (xor y c))) x y false).snd)) = 2 ^ List.length y + ((2 ^ List.length y * bif (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor x (xor y c))) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor x (xor y c))) x y false).snd)2 ^ List.length (xor (xor a b) (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) * addLsb 0 (a && b || a && (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst || b && (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst) + ((2 ^ List.length (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor a b) (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) = ((2 ^ List.length x * bif a then 1 else 0) + 2 ^ List.length y * bif b then 1 else 0) + (2 ^ List.length (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd * addLsb 0 (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst + List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd)
false.true(2 ^ List.length y * bif (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor x (xor y c))) x y false).fst then 0 else 1) + ((2 ^ List.length y * bif (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor x (xor y c))) x y false).fst then 1 else 0) + ((2 ^ List.length y * bif (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor x (xor y c))) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor x (xor y c))) x y false).snd)) = 2 ^ List.length y + ((2 ^ List.length y * bif (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor x (xor y c))) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor x (xor y c))) x y false).snd)
true.false(2 ^ List.length y * bif (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor x (xor y c))) x y false).fst then 0 else 1) + ((2 ^ List.length y * bif (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor x (xor y c))) x y false).fst then 1 else 0) + ((2 ^ List.length y * bif (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor x (xor y c))) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor x (xor y c))) x y false).snd)) = 2 ^ List.length y + ((2 ^ List.length y * bif (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor x (xor y c))) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor x (xor y c))) x y false).snd)2 ^ List.length (xor (xor a b) (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) * addLsb 0 (a && b || a && (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst || b && (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst) + ((2 ^ List.length (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor a b) (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) = ((2 ^ List.length x * bif a then 1 else 0) + 2 ^ List.length y * bif b then 1 else 0) + (2 ^ List.length (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd * addLsb 0 (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst + List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd)
true.false.false(2 ^ List.length y * bif false then 0 else 1) + ((2 ^ List.length y * bif false then 1 else 0) + ((2 ^ List.length y * bif false then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor x (xor y c))) x y false).snd)) = 2 ^ List.length y + ((2 ^ List.length y * bif false then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor x (xor y c))) x y false).snd)
true.false.true(2 ^ List.length y * bif true then 0 else 1) + ((2 ^ List.length y * bif true then 1 else 0) + ((2 ^ List.length y * bif true then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor x (xor y c))) x y false).snd)) = 2 ^ List.length y + ((2 ^ List.length y * bif true then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor x (xor y c))) x y false).snd)2 ^ List.length (xor (xor a b) (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) * addLsb 0 (a && b || a && (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst || b && (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst) + ((2 ^ List.length (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor a b) (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) = ((2 ^ List.length x * bif a then 1 else 0) + 2 ^ List.length y * bif b then 1 else 0) + (2 ^ List.length (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd * addLsb 0 (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst + List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd)
false.true.false(2 ^ List.length y * bif false then 0 else 1) + ((2 ^ List.length y * bif false then 1 else 0) + ((2 ^ List.length y * bif false then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor x (xor y c))) x y false).snd)) = 2 ^ List.length y + ((2 ^ List.length y * bif false then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor x (xor y c))) x y false).snd)
false.true.true(2 ^ List.length y * bif true then 0 else 1) + ((2 ^ List.length y * bif true then 1 else 0) + ((2 ^ List.length y * bif true then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor x (xor y c))) x y false).snd)) = 2 ^ List.length y + ((2 ^ List.length y * bif true then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor x (xor y c))) x y false).snd)
true.false.false(2 ^ List.length y * bif false then 0 else 1) + ((2 ^ List.length y * bif false then 1 else 0) + ((2 ^ List.length y * bif false then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor x (xor y c))) x y false).snd)) = 2 ^ List.length y + ((2 ^ List.length y * bif false then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor x (xor y c))) x y false).snd)
true.false.true(2 ^ List.length y * bif true then 0 else 1) + ((2 ^ List.length y * bif true then 1 else 0) + ((2 ^ List.length y * bif true then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor x (xor y c))) x y false).snd)) = 2 ^ List.length y + ((2 ^ List.length y * bif true then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor x (xor y c))) x y false).snd)2 ^ List.length (xor (xor a b) (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) * addLsb 0 (a && b || a && (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst || b && (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst) + ((2 ^ List.length (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor a b) (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd) = ((2 ^ List.length x * bif a then 1 else 0) + 2 ^ List.length y * bif b then 1 else 0) + (2 ^ List.length (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd * addLsb 0 (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).fst + List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (x && y || x && c || y && c, xor (xor x y) c)) x y false).snd)theoremGoals accomplished! πtoNat_adc {toNat_adc: β {n : β} {x y : Bitvec n}, Bitvec.toNat (adc x y false) = Bitvec.toNat x + Bitvec.toNat yn :n: βNat} {Nat: Typexx: Bitvec ny : Bitvecy: Bitvec nn} : (Bitvec.adcn: βxx: Bitvec nyy: Bitvec nfalse).toNat =false: Boolx.toNat +x: Bitvec ny.toNat :=y: Bitvec nGoals accomplished! πBitvec.toNat (adc x y false) = Bitvec.toNat x + Bitvec.toNat y
mkBitvec.toNat (adc { val := x, property := hx } y false) = Bitvec.toNat { val := x, property := hx } + Bitvec.toNat yBitvec.toNat (adc x y false) = Bitvec.toNat x + Bitvec.toNat y
mk.mkBitvec.toNat (adc { val := x, property := hx } { val := y, property := hy } false) = Bitvec.toNat { val := x, property := hx } + Bitvec.toNat { val := y, property := hy }Bitvec.toNat (adc x y false) = Bitvec.toNat x + Bitvec.toNat y
mk.mkBitvec.toNat (adc { val := x, property := (_ : List.length x = List.length x) } { val := y, property := hy } false) = Bitvec.toNat { val := x, property := (_ : List.length x = List.length x) } + Bitvec.toNat { val := y, property := hy }Bitvec.toNat (adc x y false) = Bitvec.toNat x + Bitvec.toNat y
mk.mkList.foldl addLsb (addLsb 0 (List.mapAccumrβ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) x y false).fst) (List.mapAccumrβ (fun x y c => (Bitvec.carry x y c, Bitvec.xor3 x y c)) x y false).snd = List.foldl addLsb 0 x + List.foldl addLsb 0 yBitvec.toNat (adc x y false) = Bitvec.toNat x + Bitvec.toNat ytheoremGoals accomplished! πtoNat_tail : β {toNat_tail: β {n : β} (x : Bitvec n), Bitvec.toNat (Vector.tail x) = Bitvec.toNat x % 2 ^ (n - 1)n :n: βNat} (Nat: Typex : Bitvecx: Bitvec nn), Bitvec.toNatn: βx.tail =x: Bitvec nx.toNat %x: Bitvec n2^(2: ?m.143492n-n: β1) |1: ?m.1435050, β¨[], _β© => rfl |0: βn+n: β1, β¨1: βa::l,a: Boolhβ© =>h: List.length (a :: l) = n + 1Goals accomplished! πBitvec.toNat (Vector.tail { val := a :: l, property := h }) = Bitvec.toNat { val := a :: l, property := h } % 2 ^ (n + 1 - 1)Bitvec.toNat (Vector.tail { val := a :: l, property := h }) = Bitvec.toNat { val := a :: l, property := h } % 2 ^ (n + 1 - 1)Bitvec.toNat (Vector.tail { val := a :: l, property := h })Bitvec.toNat (Vector.tail { val := a :: l, property := h }) % 2 ^ (n + 1 - 1)Bitvec.toNat (Vector.tail { val := a :: l, property := h }) % 2 ^ (n + 1 - 1)Bitvec.toNat (Vector.tail { val := a :: l, property := h }) = Bitvec.toNat { val := a :: l, property := h } % 2 ^ (n + 1 - 1)Bitvec.toNat (Vector.tail { val := a :: l, property := hβ }) % 2 ^ (n + 1 - 1) = Bitvec.toNat { val := a :: l, property := hβ } % 2 ^ (n + 1 - 1)Bitvec.toNat (Vector.tail { val := a :: l, property := h }) = Bitvec.toNat { val := a :: l, property := h } % 2 ^ (n + 1 - 1)Bitvec.toNat (Vector.tail { val := a :: l, property := h }) = Bitvec.toNat { val := a :: l, property := h } % 2 ^ (n + 1 - 1)Bitvec.toNat (Vector.tail { val := a :: l, property := h }) = Bitvec.toNat { val := a :: l, property := h } % 2 ^ (n + 1 - 1)List.foldl addLsb 0 l % 2 ^ n = List.foldl addLsb 0 l % 2 ^ n@[simp] theoremGoals accomplished! πtoNat_add {toNat_add: β {n : β} (x y : Bitvec n), Bitvec.toNat (x + y) = (Bitvec.toNat x + Bitvec.toNat y) % 2 ^ nn :n: βNat} (Nat: Typexx: Bitvec ny : Bitvecy: Bitvec nn) : (n: βx +x: Bitvec ny).toNat = (y: Bitvec nx.toNat +x: Bitvec ny.toNat) %y: Bitvec n2^2: ?m.146225n :=n: βGoals accomplished! πBitvec.toNat (x + y) = (Bitvec.toNat x + Bitvec.toNat y) % 2 ^ nBitvec.toNat (Vector.tail (adc x y false)) = (Bitvec.toNat x + Bitvec.toNat y) % 2 ^ nBitvec.toNat (x + y) = (Bitvec.toNat x + Bitvec.toNat y) % 2 ^ nBitvec.toNat (Vector.tail (adc x y false)) = (Bitvec.toNat x + Bitvec.toNat y) % 2 ^ nBitvec.toNat (adc x y false) % 2 ^ (n + 1 - 1) = (Bitvec.toNat x + Bitvec.toNat y) % 2 ^ nBitvec.toNat (Vector.tail (adc x y false)) = (Bitvec.toNat x + Bitvec.toNat y) % 2 ^ n(Bitvec.toNat x + Bitvec.toNat y) % 2 ^ (n + 1 - 1) = (Bitvec.toNat x + Bitvec.toNat y) % 2 ^ nBitvec.toNat (Vector.tail (adc x y false)) = (Bitvec.toNat x + Bitvec.toNat y) % 2 ^ n(Bitvec.toNat x + Bitvec.toNat y) % 2 ^ n = (Bitvec.toNat x + Bitvec.toNat y) % 2 ^ ntheorem toZMod_add {Goals accomplished! πn :n: ββ} (β: Typexx: Bitvec ny : Bitvecy: Bitvec nn) : (n: βx +x: Bitvec ny).toZMod = (y: Bitvec nx.toZMod +x: Bitvec ny.toZMod) :=y: Bitvec nGoals accomplished! π
a(Bitvec.toNat x + Bitvec.toNat y) % 2 ^ n = (Bitvec.toNat x + ZMod.val (toZMod y)) % 2 ^ n
a(Bitvec.toNat x + Bitvec.toNat y) % 2 ^ n = (Bitvec.toNat x + Bitvec.toNat y) % 2 ^ ntheorem ofZMod_add {Goals accomplished! πn :n: ββ} (x y : ZMod (β: Type2 ^2: ?m.147846n)) : Bitvec.ofZMod (x + y) = Bitvec.ofZMod x + Bitvec.ofZMod y :=n: βGoals accomplished! πtheoremGoals accomplished! πzero_def : (zero_def: β {n : β}, 0 = { val := List.replicate n false, property := (_ : List.length β0 = n) }0 : Bitvec0: ?m.148270n) = β¨List.replicaten: ?m.148264nn: ?m.148264false, (false: Bool0 : Bitvec0: ?m.148318n).2β© := rfl theoremn: ?m.148264toList_zero : Vector.toList (toList_zero: β {n : β}, Vector.toList 0 = List.replicate n false0 : Bitvec0: ?m.148366n) = List.replicaten: ?m.148357nn: ?m.148357false := rfl @[simp] theoremfalse: BooltoNat_zero : β {toNat_zero: β {n : β}, Bitvec.toNat 0 = 0n :n: βNat}, (Nat: Type0 : Bitvec0: ?m.148433n).toNat =n: β0 |0: ?m.1484650 => rfl |0: βn+1 =>n: βGoals accomplished! πn: βBitvec.toNat 0 = 0theoremGoals accomplished! πofNat_zero : Bitvec.ofNatofNat_zero: β {w : β}, Bitvec.ofNat w 0 = 0ww: ?m.1493690 =0: ?m.1493740 :=0: ?m.149385Goals accomplished! πw: βBitvec.ofNat w 0 = 0w: βBitvec.ofNat w 0 = 0w: βBitvec.ofNat w (Bitvec.toNat 0) = 0w: βw: βBitvec.ofNat w 0 = 0@[simp] theorem toZMod_zero : β {Goals accomplished! πn :n: βNat}, (Nat: Type0 : Bitvec0: ?m.149459n).toZMod =n: β0 :=0: ?m.149507Goals accomplished! π@[simp] theorem ofZMod_zero : Bitvec.ofZMod (Goals accomplished! π0 : ZMod (0: ?m.1514332^2: ?m.151361n)) =n: ?m.1513510 :=0: ?m.151736Goals accomplished! πtheoremGoals accomplished! πtoList_one {toList_one: β {n : β}, Vector.toList 1 = List.replicate n false ++ [true]n :n: ββ} : (β: Type1 : Bitvec (1: ?m.151914n +n: β1)).toList = List.replicate1: ?m.151853nn: βfalse ++ [false: Booltrue] := rfl theoremtrue: BooltoNat_one : β {toNat_one: β {n : β}, Bitvec.toNat 1 = if n = 0 then 0 else 1n :n: βNat}, (Nat: Type1 : Bitvec1: ?m.152071n).toNat = ifn: βn =n: β0 then0: ?m.1521040 else0: ?m.1521291 |1: ?m.1521400 => rfl |0: β1 => rfl |1: βn+2 =>n: βGoals accomplished! πn: βBitvec.toNat 1 = if n + 2 = 0 then 0 else 1Bitvec.toNat 1 = if n + 2 = 0 then 0 else 1n: βBitvec.toNat 1 = if n + 2 = 0 then 0 else 1addLsb (List.foldl addLsb (addLsb 0 false) (List.replicate n false)) true = 1n: βBitvec.toNat 1 = if n + 2 = 0 then 0 else 1addLsb (List.foldl addLsb (addLsb 0 false) (List.replicate n false)) true = 1n: βBitvec.toNat 1 = if n + 2 = 0 then 0 else 1addLsb (List.foldl addLsb (addLsb 0 false) (List.replicate n false)) true = 1addLsb (2 ^ List.length (List.replicate n false) * addLsb 0 false + List.foldl addLsb 0 (List.replicate n false)) true = 1addLsb (List.foldl addLsb (addLsb 0 false) (List.replicate n false)) true = 1n: βBitvec.toNat 1 = if n + 2 = 0 then 0 else 1@[simp] theorem toZMod_one : β {Goals accomplished! πn :n: βNat}, (Nat: Type1 : Bitvec1: ?m.155230n).toZMod =n: β1 :=1: ?m.155278Goals accomplished! π@[simp] theorem ofZMod_one : Bitvec.ofZMod (Goals accomplished! π1 : ZMod (1: ?m.1594022^2: ?m.159330n)) =n: ?m.1593201 :=1: ?m.159615Goals accomplished! πinstance : SMulGoals accomplished! πβ (Bitvecβ: Typen) := β¨nsmulRecβ© theorem nsmul_def {n: ?m.159727n :n: ββ} (β: Typex : Bitvecx: Bitvec nn) (n: βy :y: ββ) :β: Typey β’y: βx = nsmulRecx: Bitvec nyy: βx := rfl @[simp] theorem toZMod_nsmul {x: Bitvec nn :n: ββ} (β: Typex : Bitvecx: Bitvec nn) (n: βy :y: ββ) : (β: Typey β’y: βx).toZMod =x: Bitvec ny β’y: βx.toZMod :=x: Bitvec nGoals accomplished! πGoals accomplished! πGoals accomplished! πtheoremGoals accomplished! πtoInt_sub_aux : β {x y : ListtoInt_sub_aux: β {x y : List Bool}, List.length x = List.length y β (β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) x y false).snd) - 2 ^ List.length x * bif (List.mapAccumrβ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) x y false).fst then 1 else 0) = β(List.foldl addLsb 0 x) + -β(List.foldl addLsb 0 y)Bool} (Bool: Type_hx : List.length x = List.length y), (β(List.foldl addLsb_hx: List.length x = List.length y0 (List.mapAccumrβ (fun0: ?m.164935xx: ?m.164954yy: ?m.164957c => (Bitvec.carry (!c: ?m.164960x)x: ?m.164954yy: ?m.164957c, Bitvec.xor3c: ?m.164960xx: ?m.164954yy: ?m.164957c)) x yc: ?m.164960false).snd) :false: Boolβ€) -β€: Type2 ^ x.length * cond (List.mapAccumrβ (fun2: ?m.165039xx: ?m.165063yy: ?m.165066c => (Bitvec.carry (!c: ?m.165069x)x: ?m.165063yy: ?m.165066c, Bitvec.xor3c: ?m.165069xx: ?m.165063yy: ?m.165066c)) x yc: ?m.165069false).fstfalse: Bool11: ?m.1650900 = β(List.foldl addLsb0: ?m.1651000 x) + -β(List.foldl addLsb0: ?m.1654540 y) | [], [], _ => rfl |0: ?m.165498a::x,a: Boolb::y,b: Boolh =>h: List.length (a :: x) = List.length (b :: y)Goals accomplished! π(β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).snd) - 2 ^ List.length (a :: x) * bif (List.mapAccumrβ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).fst then 1 else 0) = β(List.foldl addLsb 0 (a :: x)) + -β(List.foldl addLsb 0 (b :: y))(β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).snd) - 2 ^ List.length (a :: x) * bif (List.mapAccumrβ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).fst then 1 else 0) = β(List.foldl addLsb 0 (a :: x)) + -β(List.foldl addLsb 0 (b :: y))(β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).snd) - 2 ^ List.length (a :: x) * bif (List.mapAccumrβ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).fst then 1 else 0) = β(List.foldl addLsb 0 (a :: x)) + -β(List.foldl addLsb 0 (b :: y))(β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).snd) - 2 ^ List.length (a :: x) * bif (List.mapAccumrβ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).fst then 1 else 0) = β(List.foldl addLsb 0 (a :: x)) + -β(List.foldl addLsb 0 (b :: y))(β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).snd) - 2 ^ List.length (a :: x) * bif (List.mapAccumrβ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).fst then 1 else 0) = β((2 ^ List.length x * bif a then 1 else 0) + List.foldl addLsb 0 x) + -β(List.foldl addLsb 0 (b :: y))(β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).snd) - 2 ^ List.length (a :: x) * bif (List.mapAccumrβ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).fst then 1 else 0) = β(List.foldl addLsb 0 (a :: x)) + -β(List.foldl addLsb 0 (b :: y))(β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).snd) - 2 ^ List.length (a :: x) * bif (List.mapAccumrβ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).fst then 1 else 0) = β((2 ^ List.length x * bif a then 1 else 0) + List.foldl addLsb 0 x) + -β((2 ^ List.length y * bif b then 1 else 0) + List.foldl addLsb 0 y)(β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).snd) - 2 ^ List.length (a :: x) * bif (List.mapAccumrβ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).fst then 1 else 0) = β(List.foldl addLsb 0 (a :: x)) + -β(List.foldl addLsb 0 (b :: y))(β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).snd) - 2 ^ List.length (a :: x) * bif (List.mapAccumrβ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).fst then 1 else 0) = β(2 ^ List.length x * bif a then 1 else 0) + β(List.foldl addLsb 0 x) + -β((2 ^ List.length y * bif b then 1 else 0) + List.foldl addLsb 0 y)(β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).snd) - 2 ^ List.length (a :: x) * bif (List.mapAccumrβ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).fst then 1 else 0) = β(List.foldl addLsb 0 (a :: x)) + -β(List.foldl addLsb 0 (b :: y))(β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).snd) - 2 ^ List.length (a :: x) * bif (List.mapAccumrβ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).fst then 1 else 0) = β(2 ^ List.length x * bif a then 1 else 0) + β(List.foldl addLsb 0 x) + -(β(2 ^ List.length y * bif b then 1 else 0) + β(List.foldl addLsb 0 y))(β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).snd) - 2 ^ List.length (a :: x) * bif (List.mapAccumrβ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).fst then 1 else 0) = β(List.foldl addLsb 0 (a :: x)) + -β(List.foldl addLsb 0 (b :: y))(β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).snd) - 2 ^ List.length (a :: x) * bif (List.mapAccumrβ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).fst then 1 else 0) = β(2 ^ List.length x * bif a then 1 else 0) + β(List.foldl addLsb 0 x) + (-β(2 ^ List.length y * bif b then 1 else 0) + -β(List.foldl addLsb 0 y))(β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).snd) - 2 ^ List.length (a :: x) * bif (List.mapAccumrβ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).fst then 1 else 0) = β(List.foldl addLsb 0 (a :: x)) + -β(List.foldl addLsb 0 (b :: y))(β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).snd) - 2 ^ List.length (a :: x) * bif (List.mapAccumrβ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).fst then 1 else 0) = β(2 ^ List.length x * bif a then 1 else 0) + -β(2 ^ List.length y * bif b then 1 else 0) + (β(List.foldl addLsb 0 x) + -β(List.foldl addLsb 0 y))(β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).snd) - 2 ^ List.length (a :: x) * bif (List.mapAccumrβ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).fst then 1 else 0) = β(List.foldl addLsb 0 (a :: x)) + -β(List.foldl addLsb 0 (b :: y))(β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).snd) - 2 ^ List.length (a :: x) * bif (List.mapAccumrβ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).fst then 1 else 0) = β(2 ^ List.length x * bif a then 1 else 0) + -β(2 ^ List.length y * bif b then 1 else 0) + (β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) x y false).snd) - 2 ^ List.length x * bif (List.mapAccumrβ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) x y false).fst then 1 else 0)(β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).snd) - 2 ^ List.length (a :: x) * bif (List.mapAccumrβ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).fst then 1 else 0) = β(List.foldl addLsb 0 (a :: x)) + -β(List.foldl addLsb 0 (b :: y))(β(List.foldl addLsb 0 (let r := List.mapAccumrβ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) x y false; let q := (Bitvec.carry (!a) b r.fst, Bitvec.xor3 a b r.fst); (q.fst, q.snd :: r.snd)).snd) - 2 ^ List.length (a :: x) * bif (let r := List.mapAccumrβ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) x y false; let q := (Bitvec.carry (!a) b r.fst, Bitvec.xor3 a b r.fst); (q.fst, q.snd :: r.snd)).fst then 1 else 0) = β(2 ^ List.length x * bif a then 1 else 0) + -β(2 ^ List.length y * bif b then 1 else 0) + (β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) x y false).snd) - 2 ^ List.length x * bif (List.mapAccumrβ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) x y false).fst then 1 else 0)(β(List.foldl addLsb 0 (let r := List.mapAccumrβ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) x y false; let q := (Bitvec.carry (!a) b r.fst, Bitvec.xor3 a b r.fst); (q.fst, q.snd :: r.snd)).snd) - 2 ^ List.length (a :: x) * bif (let r := List.mapAccumrβ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) x y false; let q := (Bitvec.carry (!a) b r.fst, Bitvec.xor3 a b r.fst); (q.fst, q.snd :: r.snd)).fst then 1 else 0) = β(2 ^ List.length x * bif a then 1 else 0) + -β(2 ^ List.length y * bif b then 1 else 0) + (β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) x y false).snd) - 2 ^ List.length x * bif (List.mapAccumrβ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) x y false).fst then 1 else 0)(β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).snd) - 2 ^ List.length (a :: x) * bif (List.mapAccumrβ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).fst then 1 else 0) = β(List.foldl addLsb 0 (a :: x)) + -β(List.foldl addLsb 0 (b :: y))(β(List.foldl addLsb 0 (xor (xor a b) (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd)) - 2 ^ List.length (a :: x) * bif !a && b || !a && (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst || b && (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) = β(2 ^ List.length x * bif a then 1 else 0) + -β(2 ^ List.length y * bif b then 1 else 0) + (β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) - 2 ^ List.length x * bif (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0)(β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).snd) - 2 ^ List.length (a :: x) * bif (List.mapAccumrβ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).fst then 1 else 0) = β(List.foldl addLsb 0 (a :: x)) + -β(List.foldl addLsb 0 (b :: y))(β(List.foldl addLsb 0 (xor (xor a b) (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd)) - 2 ^ List.length (a :: x) * bif !a && b || !a && (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst || b && (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) = β(2 ^ List.length x * bif a then 1 else 0) + -β(2 ^ List.length y * bif b then 1 else 0) + (β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) - 2 ^ List.length x * bif (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0)(β(2 ^ List.length (xor (xor a b) (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) * 0 + List.foldl addLsb 0 (xor (xor a b) (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd)) - 2 ^ List.length (a :: x) * bif !a && b || !a && (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst || b && (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) = β(2 ^ List.length x * bif a then 1 else 0) + -β(2 ^ List.length y * bif b then 1 else 0) + (β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) - 2 ^ List.length x * bif (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0)(β(List.foldl addLsb 0 (xor (xor a b) (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd)) - 2 ^ List.length (a :: x) * bif !a && b || !a && (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst || b && (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) = β(2 ^ List.length x * bif a then 1 else 0) + -β(2 ^ List.length y * bif b then 1 else 0) + (β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) - 2 ^ List.length x * bif (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0)(β(2 ^ List.length (xor (xor a b) (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) * 0 + ((2 ^ List.length (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor a b) (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd)) - 2 ^ List.length (a :: x) * bif !a && b || !a && (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst || b && (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) = β(2 ^ List.length x * bif a then 1 else 0) + -β(2 ^ List.length y * bif b then 1 else 0) + (β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) - 2 ^ List.length x * bif (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0)(β(2 ^ List.length (xor (xor a b) (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) * 0 + ((2 ^ List.length (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor a b) (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd)) - 2 ^ List.length (a :: x) * bif !a && b || !a && (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst || b && (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) = β(2 ^ List.length x * bif a then 1 else 0) + -β(2 ^ List.length y * bif b then 1 else 0) + (β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) - 2 ^ List.length x * bif (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0)(β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).snd) - 2 ^ List.length (a :: x) * bif (List.mapAccumrβ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) (a :: x) (b :: y) false).fst then 1 else 0) = β(List.foldl addLsb 0 (a :: x)) + -β(List.foldl addLsb 0 (b :: y))
false(β(2 ^ List.length (xor (xor false b) (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) * 0 + ((2 ^ List.length (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor false b) (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd)) - 2 ^ List.length (false :: x) * bif !false && b || !false && (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst || b && (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) = β(2 ^ List.length x * bif false then 1 else 0) + -β(2 ^ List.length y * bif b then 1 else 0) + (β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) - 2 ^ List.length x * bif (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0)
true(β(2 ^ List.length (xor (xor true b) (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) * 0 + ((2 ^ List.length (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor true b) (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd)) - 2 ^ List.length (true :: x) * bif !true && b || !true && (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst || b && (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) = β(2 ^ List.length x * bif true then 1 else 0) + -β(2 ^ List.length y * bif b then 1 else 0) + (β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) - 2 ^ List.length x * bif (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0)(β(2 ^ List.length (xor (xor a b) (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) * 0 + ((2 ^ List.length (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor a b) (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd)) - 2 ^ List.length (a :: x) * bif !a && b || !a && (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst || b && (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) = β(2 ^ List.length x * bif a then 1 else 0) + -β(2 ^ List.length y * bif b then 1 else 0) + (β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) - 2 ^ List.length x * bif (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0)
false(β(2 ^ List.length (xor (xor false b) (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) * 0 + ((2 ^ List.length (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor false b) (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd)) - 2 ^ List.length (false :: x) * bif !false && b || !false && (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst || b && (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) = β(2 ^ List.length x * bif false then 1 else 0) + -β(2 ^ List.length y * bif b then 1 else 0) + (β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) - 2 ^ List.length x * bif (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0)
true(β(2 ^ List.length (xor (xor true b) (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) * 0 + ((2 ^ List.length (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor true b) (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd)) - 2 ^ List.length (true :: x) * bif !true && b || !true && (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst || b && (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) = β(2 ^ List.length x * bif true then 1 else 0) + -β(2 ^ List.length y * bif b then 1 else 0) + (β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) - 2 ^ List.length x * bif (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0)(β(2 ^ List.length (xor (xor a b) (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) * 0 + ((2 ^ List.length (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor a b) (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd)) - 2 ^ List.length (a :: x) * bif !a && b || !a && (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst || b && (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) = β(2 ^ List.length x * bif a then 1 else 0) + -β(2 ^ List.length y * bif b then 1 else 0) + (β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) - 2 ^ List.length x * bif (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0)
true.false(β(2 ^ List.length (xor (xor true false) (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) * 0 + ((2 ^ List.length (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor true false) (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd)) - 2 ^ List.length (true :: x) * bif !true && false || !true && (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst || false && (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) = β(2 ^ List.length x * bif true then 1 else 0) + -β(2 ^ List.length y * bif false then 1 else 0) + (β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) - 2 ^ List.length x * bif (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0)
true.true(β(2 ^ List.length (xor (xor true true) (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) * 0 + ((2 ^ List.length (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor true true) (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd)) - 2 ^ List.length (true :: x) * bif !true && true || !true && (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst || true && (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) = β(2 ^ List.length x * bif true then 1 else 0) + -β(2 ^ List.length y * bif true then 1 else 0) + (β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) - 2 ^ List.length x * bif (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0)(β(2 ^ List.length (xor (xor a b) (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) * 0 + ((2 ^ List.length (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor a b) (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd)) - 2 ^ List.length (a :: x) * bif !a && b || !a && (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst || b && (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) = β(2 ^ List.length x * bif a then 1 else 0) + -β(2 ^ List.length y * bif b then 1 else 0) + (β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) - 2 ^ List.length x * bif (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0)
false.false(β(2 ^ List.length (xor (xor false false) (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) * 0 + ((2 ^ List.length (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor false false) (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd)) - 2 ^ List.length (false :: x) * bif !false && false || !false && (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst || false && (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) = β(2 ^ List.length x * bif false then 1 else 0) + -β(2 ^ List.length y * bif false then 1 else 0) + (β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) - 2 ^ List.length x * bif (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0)
false.true(β(2 ^ List.length (xor (xor false true) (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) * 0 + ((2 ^ List.length (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor false true) (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd)) - 2 ^ List.length (false :: x) * bif !false && true || !false && (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst || true && (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) = β(2 ^ List.length x * bif false then 1 else 0) + -β(2 ^ List.length y * bif true then 1 else 0) + (β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) - 2 ^ List.length x * bif (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0)
true.false(β(2 ^ List.length (xor (xor true false) (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) * 0 + ((2 ^ List.length (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor true false) (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd)) - 2 ^ List.length (true :: x) * bif !true && false || !true && (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst || false && (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) = β(2 ^ List.length x * bif true then 1 else 0) + -β(2 ^ List.length y * bif false then 1 else 0) + (β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) - 2 ^ List.length x * bif (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0)
true.true(β(2 ^ List.length (xor (xor true true) (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) * 0 + ((2 ^ List.length (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor true true) (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd)) - 2 ^ List.length (true :: x) * bif !true && true || !true && (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst || true && (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) = β(2 ^ List.length x * bif true then 1 else 0) + -β(2 ^ List.length y * bif true then 1 else 0) + (β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) - 2 ^ List.length x * bif (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0)(β(2 ^ List.length (xor (xor a b) (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) * 0 + ((2 ^ List.length (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor a b) (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd)) - 2 ^ List.length (a :: x) * bif !a && b || !a && (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst || b && (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) = β(2 ^ List.length x * bif a then 1 else 0) + -β(2 ^ List.length y * bif b then 1 else 0) + (β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) - 2 ^ List.length x * bif (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0)
true.trueβ2 ^ List.length y * β(bif (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).fst then 1 else 0) + (β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) + -((2 ^ List.length y * bif (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).fst then 1 else 0) + 2 ^ List.length y * bif (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).fst then 1 else 0)) = β2 ^ List.length y + (-β2 ^ List.length y + (β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) + -(2 ^ List.length y * bif (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).fst then 1 else 0)))(β(2 ^ List.length (xor (xor a b) (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) * 0 + ((2 ^ List.length (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor a b) (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd)) - 2 ^ List.length (a :: x) * bif !a && b || !a && (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst || b && (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) = β(2 ^ List.length x * bif a then 1 else 0) + -β(2 ^ List.length y * bif b then 1 else 0) + (β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) - 2 ^ List.length x * bif (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0)
false.falseβ2 ^ List.length y * β(bif (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).fst then 1 else 0) + (β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) + -((2 ^ List.length y * bif (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).fst then 1 else 0) + 2 ^ List.length y * bif (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).fst then 1 else 0)) = β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) + -(2 ^ List.length y * bif (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).fst then 1 else 0)
false.true-(2 ^ List.length y + 2 ^ List.length y) + (β2 ^ List.length y * β(bif (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).fst then 0 else 1) + β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd)) = -β2 ^ List.length y + (β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) + -(2 ^ List.length y * bif (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).fst then 1 else 0))
true.falseβ2 ^ List.length y * β(bif (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).fst then 0 else 1) + β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) = β2 ^ List.length y + (β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) + -(2 ^ List.length y * bif (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).fst then 1 else 0))
true.trueβ2 ^ List.length y * β(bif (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).fst then 1 else 0) + (β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) + -((2 ^ List.length y * bif (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).fst then 1 else 0) + 2 ^ List.length y * bif (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).fst then 1 else 0)) = β2 ^ List.length y + (-β2 ^ List.length y + (β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) + -(2 ^ List.length y * bif (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).fst then 1 else 0)))(β(2 ^ List.length (xor (xor a b) (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) * 0 + ((2 ^ List.length (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor a b) (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd)) - 2 ^ List.length (a :: x) * bif !a && b || !a && (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst || b && (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) = β(2 ^ List.length x * bif a then 1 else 0) + -β(2 ^ List.length y * bif b then 1 else 0) + (β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) - 2 ^ List.length x * bif (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0)
true.falseβ(bif (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).fst then 0 else 1) * 2 ^ List.length y + β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) = β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) - (bif (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).fst then 1 else 0) * 2 ^ List.length y + 2 ^ List.length y(β(2 ^ List.length (xor (xor a b) (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) * 0 + ((2 ^ List.length (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor a b) (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd)) - 2 ^ List.length (a :: x) * bif !a && b || !a && (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst || b && (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) = β(2 ^ List.length x * bif a then 1 else 0) + -β(2 ^ List.length y * bif b then 1 else 0) + (β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) - 2 ^ List.length x * bif (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0)
false.falseβ(bif (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).fst then 1 else 0) * 2 ^ List.length y + (β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) - (bif (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).fst then 1 else 0) * 2 ^ List.length y * 2) = β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) - (bif (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).fst then 1 else 0) * 2 ^ List.length y
false.trueβ(bif (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).fst then 0 else 1) * 2 ^ List.length y + (β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) - 2 ^ List.length y * 2) = β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) + (-((bif (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).fst then 1 else 0) * 2 ^ List.length y) - 2 ^ List.length y)
true.falseβ(bif (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).fst then 0 else 1) * 2 ^ List.length y + β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) = β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) - (bif (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).fst then 1 else 0) * 2 ^ List.length y + 2 ^ List.length y
true.trueβ(bif (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).fst then 1 else 0) * 2 ^ List.length y + (β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) - (bif (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).fst then 1 else 0) * 2 ^ List.length y * 2) = β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) - (bif (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).fst then 1 else 0) * 2 ^ List.length y(β(2 ^ List.length (xor (xor a b) (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) * 0 + ((2 ^ List.length (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor a b) (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd)) - 2 ^ List.length (a :: x) * bif !a && b || !a && (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst || b && (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) = β(2 ^ List.length x * bif a then 1 else 0) + -β(2 ^ List.length y * bif b then 1 else 0) + (β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) - 2 ^ List.length x * bif (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0)
true.true.falseβ(bif false then 1 else 0) * 2 ^ List.length y + (β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) - (bif false then 1 else 0) * 2 ^ List.length y * 2) = β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) - (bif false then 1 else 0) * 2 ^ List.length y
true.true.trueβ(bif true then 1 else 0) * 2 ^ List.length y + (β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) - (bif true then 1 else 0) * 2 ^ List.length y * 2) = β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) - (bif true then 1 else 0) * 2 ^ List.length y(β(2 ^ List.length (xor (xor a b) (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) * 0 + ((2 ^ List.length (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor a b) (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd)) - 2 ^ List.length (a :: x) * bif !a && b || !a && (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst || b && (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) = β(2 ^ List.length x * bif a then 1 else 0) + -β(2 ^ List.length y * bif b then 1 else 0) + (β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) - 2 ^ List.length x * bif (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0)
false.false.falseβ(bif false then 1 else 0) * 2 ^ List.length y + (β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) - (bif false then 1 else 0) * 2 ^ List.length y * 2) = β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) - (bif false then 1 else 0) * 2 ^ List.length y
false.false.trueβ(bif true then 1 else 0) * 2 ^ List.length y + (β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) - (bif true then 1 else 0) * 2 ^ List.length y * 2) = β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) - (bif true then 1 else 0) * 2 ^ List.length y
false.true.falseβ(bif false then 0 else 1) * 2 ^ List.length y + (β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) - 2 ^ List.length y * 2) = β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) + (-((bif false then 1 else 0) * 2 ^ List.length y) - 2 ^ List.length y)
false.true.trueβ(bif true then 0 else 1) * 2 ^ List.length y + (β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) - 2 ^ List.length y * 2) = β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) + (-((bif true then 1 else 0) * 2 ^ List.length y) - 2 ^ List.length y)
true.false.falseβ(bif false then 0 else 1) * 2 ^ List.length y + β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) = β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) - (bif false then 1 else 0) * 2 ^ List.length y + 2 ^ List.length y
true.false.trueβ(bif true then 0 else 1) * 2 ^ List.length y + β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) = β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) - (bif true then 1 else 0) * 2 ^ List.length y + 2 ^ List.length y
true.true.falseβ(bif false then 1 else 0) * 2 ^ List.length y + (β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) - (bif false then 1 else 0) * 2 ^ List.length y * 2) = β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) - (bif false then 1 else 0) * 2 ^ List.length y
true.true.trueβ(bif true then 1 else 0) * 2 ^ List.length y + (β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) - (bif true then 1 else 0) * 2 ^ List.length y * 2) = β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) - (bif true then 1 else 0) * 2 ^ List.length y(β(2 ^ List.length (xor (xor a b) (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) * 0 + ((2 ^ List.length (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor a b) (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd)) - 2 ^ List.length (a :: x) * bif !a && b || !a && (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst || b && (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) = β(2 ^ List.length x * bif a then 1 else 0) + -β(2 ^ List.length y * bif b then 1 else 0) + (β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) - 2 ^ List.length x * bif (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0)
true.true.true2 ^ List.length y + (β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) - 2 ^ List.length y * 2) = β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) - 2 ^ List.length y(β(2 ^ List.length (xor (xor a b) (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) * 0 + ((2 ^ List.length (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor a b) (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd)) - 2 ^ List.length (a :: x) * bif !a && b || !a && (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst || b && (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) = β(2 ^ List.length x * bif a then 1 else 0) + -β(2 ^ List.length y * bif b then 1 else 0) + (β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) - 2 ^ List.length x * bif (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0)
false.false.true2 ^ List.length y + (β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) - 2 ^ List.length y * 2) = β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) - 2 ^ List.length y
false.true.false2 ^ List.length y + (β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) - 2 ^ List.length y * 2) = β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) + -2 ^ List.length y
false.true.trueβ(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) - 2 ^ List.length y * 2 = β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) + (-2 ^ List.length y - 2 ^ List.length y)
true.false.false2 ^ List.length y + β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) = β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) + 2 ^ List.length y
true.true.true2 ^ List.length y + (β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) - 2 ^ List.length y * 2) = β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor x (xor y c))) x y false).snd) - 2 ^ List.length y(β(2 ^ List.length (xor (xor a b) (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst :: (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) * 0 + ((2 ^ List.length (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd * bif xor (xor a b) (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd)) - 2 ^ List.length (a :: x) * bif !a && b || !a && (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst || b && (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0) = β(2 ^ List.length x * bif a then 1 else 0) + -β(2 ^ List.length y * bif b then 1 else 0) + (β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).snd) - 2 ^ List.length x * bif (List.mapAccumrβ (fun x y c => (!x && y || !x && c || y && c, xor (xor x y) c)) x y false).fst then 1 else 0)instance (Goals accomplished! πn :n: ββ) : NeZero (β: Type2 ^2: ?m.190522n) := β¨Nat.pos_iff_ne_zero.1 <| pow_pos (n: βGoals accomplished! π)Goals accomplished! π_β© theorem toZMod_sbb {_: βn :n: ββ} (β: Typexx: Bitvec ny : Bitvecy: Bitvec nn) : (n: βx.sbbx: Bitvec nyy: Bitvec nfalse).2.toZMod =false: Boolx.toZMod -x: Bitvec ny.toZMod :=y: Bitvec nGoals accomplished! π
mk.mkβ(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) x y false).snd) = β(List.foldl addLsb 0 x) - β(List.foldl addLsb 0 y)
mk.mkβ(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) x y false).snd) = β(List.foldl addLsb 0 x) - β(List.foldl addLsb 0 y)Goals accomplished! π0 = 0Goals accomplished! πn: β
x: List Bool
hx: List.length x = n
y: List Bool
hy: List.length y = n
h2n: 2 ^ n = 0
this: β(β(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) x y false).snd) - 2 ^ List.length x * bif (List.mapAccumrβ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) x y false).fst then 1 else 0) = β(β(List.foldl addLsb 0 x) + -β(List.foldl addLsb 0 y))
mk.mkβ(List.foldl addLsb 0 (List.mapAccumrβ (fun x y c => (Bitvec.carry (!x) y c, Bitvec.xor3 x y c)) x y false).snd) = β(List.foldl addLsb 0 x) - β(List.foldl addLsb 0 y)theorem toZMod_sub {Goals accomplished! πn :n: ββ} (β: Typexx: Bitvec ny : Bitvecy: Bitvec nn) : (n: βx -x: Bitvec ny).toZMod =y: Bitvec nx.toZMod -x: Bitvec ny.toZMod := toZMod_sbby: Bitvec nxx: Bitvec ny theoremy: Bitvec ntoInt_neg_aux : β (x : ListtoInt_neg_aux: β (x : List Bool), (β(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ List.length x * bif (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) = -β(List.foldl addLsb 0 x)Bool), ((List.foldl addLsb (Bool: Type0 :0: ?m.199386β) (List.mapAccumr (funβ: Typeyy: ?m.199403c => (c: ?m.199406y ||y: ?m.199403c, xorc: ?m.199406yy: ?m.199403c)) xc: ?m.199406false).snd :false: Boolβ) -β: Type2 ^ x.length * cond (List.mapAccumr (fun2: ?m.199434yy: ?m.199456c => (c: ?m.199459y ||y: ?m.199456c, xorc: ?m.199459yy: ?m.199456c)) xc: ?m.199459false).fstfalse: Bool11: ?m.1994780 :0: ?m.199488β€) = -(List.foldl addLsbβ€: Type0 x) | [] => rfl |0: ?m.199891a::x =>a: BoolGoals accomplished! π(β(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) (a :: x) false).snd) - 2 ^ List.length (a :: x) * bif (List.mapAccumr (fun y c => (y || c, xor y c)) (a :: x) false).fst then 1 else 0) = -β(List.foldl addLsb 0 (a :: x))(β(List.foldl addLsb 0 (xor a (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst :: (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd)) - 2 ^ List.length (a :: x) * bif a || (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) = -β(List.foldl addLsb 0 (a :: x))(β(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) (a :: x) false).snd) - 2 ^ List.length (a :: x) * bif (List.mapAccumr (fun y c => (y || c, xor y c)) (a :: x) false).fst then 1 else 0) = -β(List.foldl addLsb 0 (a :: x))(β(List.foldl addLsb 0 (xor a (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst :: (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd)) - 2 ^ List.length (a :: x) * bif a || (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) = -β(List.foldl addLsb 0 (a :: x))(β((2 ^ List.length (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd * bif xor a (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ List.length (a :: x) * bif a || (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) = -β(List.foldl addLsb 0 (a :: x))(β(List.foldl addLsb 0 (xor a (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst :: (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd)) - 2 ^ List.length (a :: x) * bif a || (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) = -β(List.foldl addLsb 0 (a :: x))(β((2 ^ List.length (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd * bif xor a (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) + List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ List.length (a :: x) * bif a || (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) = -β((2 ^ List.length x * bif a then 1 else 0) + List.foldl addLsb 0 x)(β(List.foldl addLsb 0 (xor a (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst :: (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd)) - 2 ^ List.length (a :: x) * bif a || (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) = -β(List.foldl addLsb 0 (a :: x))(β(2 ^ List.length (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd * bif xor a (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) + β(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ List.length (a :: x) * bif a || (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) = -β((2 ^ List.length x * bif a then 1 else 0) + List.foldl addLsb 0 x)(β(List.foldl addLsb 0 (xor a (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst :: (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd)) - 2 ^ List.length (a :: x) * bif a || (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) = -β(List.foldl addLsb 0 (a :: x))(β(2 ^ List.length (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd * bif xor a (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) + β(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ List.length (a :: x) * bif a || (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) = -(β(2 ^ List.length x * bif a then 1 else 0) + β(List.foldl addLsb 0 x))(β(List.foldl addLsb 0 (xor a (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst :: (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd)) - 2 ^ List.length (a :: x) * bif a || (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) = -β(List.foldl addLsb 0 (a :: x))(β(2 ^ List.length (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd * bif xor a (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) + β(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ List.length (a :: x) * bif a || (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) = -β(2 ^ List.length x * bif a then 1 else 0) + -β(List.foldl addLsb 0 x)(β(List.foldl addLsb 0 (xor a (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst :: (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd)) - 2 ^ List.length (a :: x) * bif a || (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) = -β(List.foldl addLsb 0 (a :: x))(β(2 ^ List.length (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd * bif xor a (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) + β(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ List.length (a :: x) * bif a || (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) = -β(2 ^ List.length x * bif a then 1 else 0) + (β(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ List.length x * bif (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0)(β(2 ^ List.length (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd * bif xor a (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) + β(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ List.length (a :: x) * bif a || (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) = -β(2 ^ List.length x * bif a then 1 else 0) + (β(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ List.length x * bif (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0)(β(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) (a :: x) false).snd) - 2 ^ List.length (a :: x) * bif (List.mapAccumr (fun y c => (y || c, xor y c)) (a :: x) false).fst then 1 else 0) = -β(List.foldl addLsb 0 (a :: x))(2 ^ List.length x * β(bif xor a (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) + β(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ Nat.succ (List.length x) * bif a || (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) = -(2 ^ List.length x * β(bif a then 1 else 0)) + (β(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ List.length x * bif (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0)(β(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) (a :: x) false).snd) - 2 ^ List.length (a :: x) * bif (List.mapAccumr (fun y c => (y || c, xor y c)) (a :: x) false).fst then 1 else 0) = -β(List.foldl addLsb 0 (a :: x))
false(2 ^ List.length x * β(bif xor false (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) + β(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ Nat.succ (List.length x) * bif false || (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) = -(2 ^ List.length x * β(bif false then 1 else 0)) + (β(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ List.length x * bif (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0)
true(2 ^ List.length x * β(bif xor true (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) + β(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ Nat.succ (List.length x) * bif true || (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) = -(2 ^ List.length x * β(bif true then 1 else 0)) + (β(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ List.length x * bif (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0)(2 ^ List.length x * β(bif xor a (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) + β(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ Nat.succ (List.length x) * bif a || (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) = -(2 ^ List.length x * β(bif a then 1 else 0)) + (β(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ List.length x * bif (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0)
false(2 ^ List.length x * β(bif xor false (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) + β(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ Nat.succ (List.length x) * bif false || (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) = -(2 ^ List.length x * β(bif false then 1 else 0)) + (β(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ List.length x * bif (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0)
true(2 ^ List.length x * β(bif xor true (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) + β(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ Nat.succ (List.length x) * bif true || (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) = -(2 ^ List.length x * β(bif true then 1 else 0)) + (β(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ List.length x * bif (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0)(2 ^ List.length x * β(bif xor a (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) + β(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ Nat.succ (List.length x) * bif a || (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) = -(2 ^ List.length x * β(bif a then 1 else 0)) + (β(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ List.length x * bif (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0)
true.false(2 ^ List.length x * β(bif xor true false then 1 else 0) + β(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ Nat.succ (List.length x) * bif true || false then 1 else 0) = -(2 ^ List.length x * β(bif true then 1 else 0)) + (β(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ List.length x * bif false then 1 else 0)
true.true(2 ^ List.length x * β(bif xor true true then 1 else 0) + β(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ Nat.succ (List.length x) * bif true || true then 1 else 0) = -(2 ^ List.length x * β(bif true then 1 else 0)) + (β(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ List.length x * bif true then 1 else 0)(2 ^ List.length x * β(bif xor a (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) + β(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ Nat.succ (List.length x) * bif a || (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) = -(2 ^ List.length x * β(bif a then 1 else 0)) + (β(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ List.length x * bif (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0)
false.false(2 ^ List.length x * β(bif xor false false then 1 else 0) + β(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ Nat.succ (List.length x) * bif false || false then 1 else 0) = -(2 ^ List.length x * β(bif false then 1 else 0)) + (β(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ List.length x * bif false then 1 else 0)
false.true(2 ^ List.length x * β(bif xor false true then 1 else 0) + β(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ Nat.succ (List.length x) * bif false || true then 1 else 0) = -(2 ^ List.length x * β(bif false then 1 else 0)) + (β(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ List.length x * bif true then 1 else 0)
true.false(2 ^ List.length x * β(bif xor true false then 1 else 0) + β(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ Nat.succ (List.length x) * bif true || false then 1 else 0) = -(2 ^ List.length x * β(bif true then 1 else 0)) + (β(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ List.length x * bif false then 1 else 0)
true.true(2 ^ List.length x * β(bif xor true true then 1 else 0) + β(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ Nat.succ (List.length x) * bif true || true then 1 else 0) = -(2 ^ List.length x * β(bif true then 1 else 0)) + (β(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ List.length x * bif true then 1 else 0)(2 ^ List.length x * β(bif xor a (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) + β(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ Nat.succ (List.length x) * bif a || (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) = -(2 ^ List.length x * β(bif a then 1 else 0)) + (β(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ List.length x * bif (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0)
true.false2 ^ List.length x + β(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) + (-2 ^ List.length x + -2 ^ List.length x) = -2 ^ List.length x + β(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd)(2 ^ List.length x * β(bif xor a (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) + β(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ Nat.succ (List.length x) * bif a || (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) = -(2 ^ List.length x * β(bif a then 1 else 0)) + (β(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ List.length x * bif (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0)
false.true2 ^ List.length x + β(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) + (-2 ^ List.length x + -2 ^ List.length x) = β(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) + -2 ^ List.length x
true.false2 ^ List.length x + β(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) + (-2 ^ List.length x + -2 ^ List.length x) = -2 ^ List.length x + β(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd)
true.trueβ(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) + (-2 ^ List.length x + -2 ^ List.length x) = -2 ^ List.length x + (β(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) + -2 ^ List.length x)(2 ^ List.length x * β(bif xor a (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) + β(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ Nat.succ (List.length x) * bif a || (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) = -(2 ^ List.length x * β(bif a then 1 else 0)) + (β(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ List.length x * bif (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0)theorem toZMod_neg {Goals accomplished! πn :n: ββ} (β: Typex : Bitvecx: Bitvec nn) : (-n: βx).toZMod = -x: Bitvec nx.toZMod :=x: Bitvec nGoals accomplished! π
mktoZMod (Bitvec.neg { val := x, property := hx }) = -toZMod { val := x, property := hx }
mkβ(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) = -β(List.foldl addLsb 0 x)
mkβ(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) = -β(List.foldl addLsb 0 x)Goals accomplished! πGoals accomplished! πn: β
x: List Bool
hx: List.length x = n
h2n: 2 ^ n = 0
this: β(β(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ List.length x * bif (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) = β(-β(List.foldl addLsb 0 x))
mkβ(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) = -β(List.foldl addLsb 0 x)x: List Bool
h2n: 2 ^ List.length x = 0
this: β(β(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) - 2 ^ List.length x * bif (List.mapAccumr (fun y c => (y || c, xor y c)) x false).fst then 1 else 0) = β(-β(List.foldl addLsb 0 x))
mkβ(List.foldl addLsb 0 (List.mapAccumr (fun y c => (y || c, xor y c)) x false).snd) = -β(List.foldl addLsb 0 x)instance : SMulGoals accomplished! πβ€ (Bitvecβ€: Typen) := β¨zsmulRecβ© theorem zsmul_def {n: ?m.225477n :n: ββ} (β: Typex : Bitvecx: Bitvec nn) (n: βy :y: β€β€) :β€: Typey β’y: β€x = zsmulRecx: Bitvec nyy: β€x := rfl @[simp] theorem toZMod_zsmul {x: Bitvec nn :n: ββ} (β: Typex : Bitvecx: Bitvec nn) (n: βy :y: β€β€) : (β€: Typey β’y: β€x).toZMod =x: Bitvec ny β’y: β€x.toZMod :=x: Bitvec nGoals accomplished! πGoals accomplished! π
negSucctoZMod (Int.negSucc y β’ x) = Int.negSucc y β’ toZMod xGoals accomplished! πinstance : AddCommGroup (Bitvecinstance: {n : β} β AddCommGroup (Bitvec n)n) :=n: ?m.230843Function.Injective.addCommGroup toZMod (Function.Injective.addCommGroup: {Mβ : Type ?u.230850} β {Mβ : Type ?u.230849} β [inst : Add Mβ] β [inst_1 : Zero Mβ] β [inst_2 : SMul β Mβ] β [inst_3 : Neg Mβ] β [inst_4 : Sub Mβ] β [inst_5 : SMul β€ Mβ] β [inst_6 : AddCommGroup Mβ] β (f : Mβ β Mβ) β Function.Injective f β f 0 = 0 β (β (x y : Mβ), f (x + y) = f x + f y) β (β (x : Mβ), f (-x) = -f x) β (β (x y : Mβ), f (x - y) = f x - f y) β (β (x : Mβ) (n : β), f (n β’ x) = n β’ f x) β (β (x : Mβ) (n : β€), f (n β’ x) = n β’ f x) β AddCommGroup MβFunction.injective_iff_hasLeftInverse.2 β¨Function.injective_iff_hasLeftInverse: β {Ξ± : Sort ?u.231282} {Ξ² : Sort ?u.231283} [inst : Nonempty Ξ±] {f : Ξ± β Ξ²}, Function.Injective f β Function.HasLeftInverse f_, ofZMod_toZModβ©) toZMod_zero toZMod_add toZMod_neg toZMod_sub toZMod_nsmul toZMod_zsmul -- see https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Pattern.20matching.20subtypes def add? {_: ?m.231348n :n: βNat} (Nat: Typexx: Bitvec ny : Bitvecy: Bitvec nn) : Option (Bitvecn: βn) := match Bitvec.adcn: βxx: Bitvec nyy: Bitvec nfalse with | β¨false: Boolfalse :: z,false: Boolhconsβ© => some β¨z,hcons: List.length (false :: z) = n + 1Goals accomplished! πβ© | _ => none -- overflow theorem {Goals accomplished! πn :n: βNat} {Nat: Typexx: Bitvec nyy: Bitvec nz : Bitvecz: Bitvec nn} : add?n: βxx: Bitvec ny = somey: Bitvec nz βz: Bitvec nx +x: Bitvec ny =y: Bitvec nz :=z: Bitvec nsorry /- #eval (π·πΆπ·π·).toNat * (π·πΆπ·π·).toNat #eval Bitvec.mul (π·πΆπ·π·) (π·πΆπ·π·) |>.toNat -/ protected def mul? {sorry: ?m.233532n :n: βNat} (Nat: Typexx: Bitvec ny : Bitvecy: Bitvec nn) : Option (Bitvecn: βn) := do letn: βff: (r : ?m.233571) β (b : ?m.233579 r) β ?m.233580 r brr: ?m.233571b := do letb: ?m.233574opβ β Bitvec.add?opβ: ?m.233736rr: ?m.233571r letr: ?m.233571opβ β Bitvec.add?opβ: ?m.233784opβopβ: ?m.233736y return condy: Bitvec nbb: ?m.233574opβopβ: ?m.233784opβ (opβ: ?m.233736x.toList).x: Bitvec nfoldlMff: (r : ?m.233571) β (b : ?m.233579 r) β ?m.233580 r b0 /- #eval Bitvec.mul? (π·πΆπ·π·) (π·πΆπ·π·) #eval Bitvec.mul? (πΆπΆπΆπΆπΆπΆπ·πΆπ·π·) (πΆπΆπΆπΆπΆπΆπ·πΆπ·π·) |>.get!|>.toNat -/ theorem : β {0: ?m.233650n :n: βNat} {Nat: Typexx: Bitvec nyy: Bitvec nz : Bitvecz: Bitvec nn}, Bitvec.mul?n: βxx: Bitvec ny = somey: Bitvec nz βz: Bitvec nx *x: Bitvec ny =y: Bitvec nz :=z: Bitvec nsorry /-- The value produced is the unsigned integer quotient of the two operands. Note that unsigned integer division and signed integer division are distinct operations; for signed integer division, use βsdivβ. Division by zero is undefined behavior. -/ def udiv? {sorry: ?m.234343w :w: βNat} (Nat: Typexx: Bitvec wy : Bitvecy: Bitvec ww) : Option $ Bitvecw: βw := matchw: βy.toNat with |y: Bitvec w0 => none | _ => some $ Bitvec.ofNat0: βw (w: βx.toNat /x: Bitvec wy.toNat) /-- The value produced is the signed integer quotient of the two operands rounded towards zero. Note that signed integer division and unsigned integer division are distinct operations; for unsigned integer division, use βudivβ. Division by zero is undefined behavior. Overflow also leads to undefined behavior; this is a rare case, but can occur, for example, by doing a 32-bit division of -2147483648 by -1. -/ def sdiv? {y: Bitvec ww :w: βNat} (Nat: Typexx: Bitvec wy : Bitvecy: Bitvec ww) : Option $ Bitvecw: βw := ifw: βy.toInt =y: Bitvec w0 then none else some $ Bitvec.ofInt'0: ?m.234734w (w: βx.toInt /x: Bitvec wy.toInt) /-- If the condition is an i1 and it evaluates to 1, the instruction returns the first value argument; otherwise, it returns the second value argument. -/ def select {y: Bitvec ww :w: βNat} (Nat: Typec : Bitvecc: Bitvec 11) (1: ?m.234951xx: Bitvec wy : Bitvecy: Bitvec ww) : Bitvecw: βw := condw: βc.headc: Bitvec 1xx: Bitvec wy theorem bitwise_eq_eq {y: Bitvec ww :w: βNat} {Nat: Typexx: Bitvec wy : Bitvecy: Bitvec ww} : (forallw: βi : Fini: Fin ww,w: βx[x: Bitvec wi] =i: Fin wy[y: Bitvec wi]) βi: Fin wx =x: Bitvec wy := β¨y: Bitvec wVector.ext, funVector.ext: β {n : β} {Ξ± : Type ?u.235454} {v w : Vector Ξ± n}, (β (m : Fin n), Vector.get v m = Vector.get w m) β v = whh: ?m.235489_ =>_: ?m.235492h βΈ rflβ© theoremh: ?m.235489ext_get? {ext_get?: β {w : β} {x y : Bitvec w}, (β (i : β), List.get? (Vector.toList x) i = List.get? (Vector.toList y) i) β x = yw :w: βNat} {Nat: Typexx: Bitvec wy : Bitvecy: Bitvec ww} (w: βh : βh: β (i : β), List.get? (Vector.toList x) i = List.get? (Vector.toList y) ii,i: ?m.235528x.toList.get?x: Bitvec wi =i: ?m.235528y.toList.get?y: Bitvec wi) :i: ?m.235528x =x: Bitvec wy :=y: Bitvec wGoals accomplished! πx = yx: List Bool
y: Bitvec (List.length x)
h: β (i : β), List.get? (Vector.toList { val := x, property := (_ : List.length x = List.length x) }) i = List.get? (Vector.toList y) i
mk{ val := x, property := (_ : List.length x = List.length x) } = yx = yx, y: List Bool
hy: List.length y = List.length x
h: β (i : β), List.get? (Vector.toList { val := x, property := (_ : List.length x = List.length x) }) i = List.get? (Vector.toList { val := y, property := hy }) i
mk.mk{ val := x, property := (_ : List.length x = List.length x) } = { val := y, property := hy }x = y@[simp] theoremGoals accomplished! πtoList_cong {toList_cong: β {wβ wβ : β} (h : wβ = wβ) (b : Bitvec wβ), Vector.toList (Bitvec.cong h b) = Vector.toList bwβwβ: βwβ :wβ: βNat} (Nat: Typeh :h: wβ = wβwβ =wβ: βwβ) (wβ: βb : Bitvecb: Bitvec wβwβ) : (Bitvec.congwβ: βhh: wβ = wβb).toList =b: Bitvec wβb.toList :=b: Bitvec wβGoals accomplished! πVector.toList (Bitvec.cong h b) = Vector.toList bVector.toList (Bitvec.cong (_ : wβ = wβ) b) = Vector.toList bVector.toList (Bitvec.cong (_ : wβ = wβ) b) = Vector.toList bVector.toList (Bitvec.cong h b) = Vector.toList btheoremGoals accomplished! πget?_shl (x : Bitvecx: Bitvec nn) (n: ?m.235775ii: βj :j: ββ) : (β: Typex.shlx: Bitvec ni).toList.get?i: βj = ifj: βi +i: βj <j: βn thenn: ?m.235775x.toList.get? (x: Bitvec ni +i: βj) else ifj: βj <j: βn thenn: ?m.235775false else none :=false: BoolGoals accomplished! πList.get? (Vector.toList (Bitvec.cong (_ : n - i + min n i = n) (Vector.append (Vector.drop i x) (Vector.replicate (min n i) false)))) j = if i + j < n then List.get? (Vector.toList x) (i + j) else if j < n then some false else none
mkList.get? (Vector.toList (Bitvec.cong (_ : List.length x - i + min (List.length x) i = List.length x) (Vector.append (Vector.drop i { val := x, property := (_ : List.length x = List.length x) }) (Vector.replicate (min (List.length x) i) false)))) j = if i + j < List.length x then List.get? (Vector.toList { val := x, property := (_ : List.length x = List.length x) }) (i + j) else if j < List.length x then some false else none
mkList.get? (List.drop i x ++ List.replicate (min (List.length x) i) false) j = if i + j < List.length x then List.get? x (i + j) else if j < List.length x then some false else none
mk.inlList.get? (List.drop i x ++ List.replicate (min (List.length x) i) false) j = List.get? x (i + j)
mk.inr.inlList.get? (List.drop i x ++ List.replicate (min (List.length x) i) false) j = some false
mk.inr.inrList.get? (List.drop i x ++ List.replicate (min (List.length x) i) false) j = none
mk.inlList.get? (List.drop i x ++ List.replicate (min (List.length x) i) false) j = List.get? x (i + j)
mk.inr.inlList.get? (List.drop i x ++ List.replicate (min (List.length x) i) false) j = some false
mk.inr.inrList.get? (List.drop i x ++ List.replicate (min (List.length x) i) false) j = none
mk.inlj < List.length (List.drop i x)
mk.inlList.get? (List.drop i x ++ List.replicate (min (List.length x) i) false) j = List.get? x (i + j)
mk.inr.inlList.get? (List.drop i x ++ List.replicate (min (List.length x) i) false) j = some false
mk.inr.inrList.get? (List.drop i x ++ List.replicate (min (List.length x) i) false) j = none
mk.inlj < List.length (List.drop i x)
mk.inlj < List.length (List.drop i x)
mk.inlj < List.length (List.drop i x)
mk.inlj < List.length x - i
mk.inlj < List.length x - i
mk.inlj < List.length (List.drop i x)Goals accomplished! π
mk.inr.inlList.get? (List.drop i x ++ List.replicate (min (List.length x) i) false) j = some false
mk.inr.inrList.get? (List.drop i x ++ List.replicate (min (List.length x) i) false) j = none
mk.inr.inlList.get? (List.drop i x ++ List.replicate (min (List.length x) i) false) j = some false
mk.inr.inlList.get? (List.drop i x ++ List.replicate (min (List.length x) i) false) j = some false
mk.inr.inrList.get? (List.drop i x ++ List.replicate (min (List.length x) i) false) j = none
mk.inr.inlList.get? (List.drop i x ++ List.replicate (min (List.length x) i) false) j = some false
mk.inr.inlList.get? (List.replicate (min (List.length x) i) false) (j - List.length (List.drop i x)) = some false
mk.inr.inlList.length (List.drop i x) β€ j
mk.inr.inlList.get? (List.drop i x ++ List.replicate (min (List.length x) i) false) j = some false
mk.inr.inlsome (List.get (List.replicate (min (List.length x) i) false) { val := j - List.length (List.drop i x), isLt := ?mk.inr.inl }) = some false
mk.inr.inlj - List.length (List.drop i x) < List.length (List.replicate (min (List.length x) i) false)
mk.inr.inlList.length (List.drop i x) β€ j
mk.inr.inlList.get? (List.drop i x ++ List.replicate (min (List.length x) i) false) j = some false
mk.inr.inl
mk.inr.inlj - List.length (List.drop i x) < List.length (List.replicate (min (List.length x) i) false)
mk.inr.inlj - List.length (List.drop i x) < List.length (List.replicate (min (List.length x) i) false)
mk.inr.inlList.length (List.drop i x) β€ j
mk.inr.inlj - List.length (List.drop i x) < List.length (List.replicate (min (List.length x) i) false)
mk.inr.inlj - List.length (List.drop i x) < List.length (List.replicate (min (List.length x) i) false)
mk.inr.inlList.length (List.drop i x) β€ j
mk.inr.inlList.get? (List.drop i x ++ List.replicate (min (List.length x) i) false) j = some false
mk.inr.inrList.get? (List.drop i x ++ List.replicate (min (List.length x) i) false) j = none
mk.inr.inlj - List.length (List.drop i x) < List.length (List.replicate (min (List.length x) i) false)
mk.inr.inlj - List.length (List.drop i x) < List.length (List.replicate (min (List.length x) i) false)
mk.inr.inlj - List.length (List.drop i x) < List.length (List.replicate (min (List.length x) i) false)
mk.inr.inlList.length (List.drop i x) β€ j
mk.inr.inlj - List.length (List.drop i x) < List.length (List.replicate (min (List.length x) i) false)Goals accomplished! πList.length (List.drop i x) β€ jGoals accomplished! π
mk.inr.inlj - List.length (List.drop i x) < List.length (List.replicate (min (List.length x) i) false)Goals accomplished! πj < List.length (List.drop i x) + List.length (List.replicate (min (List.length x) i) false)Goals accomplished! πGoals accomplished! π
mk.inr.inlList.get? (List.drop i x ++ List.replicate (min (List.length x) i) false) j = some false
mk.inr.inrList.get? (List.drop i x ++ List.replicate (min (List.length x) i) false) j = none
mk.inr.inlList.length (List.drop i x) β€ j
mk.inr.inlList.length (List.drop i x) β€ jGoals accomplished! π
mk.inr.inrList.get? (List.drop i x ++ List.replicate (min (List.length x) i) false) j = none
mk.inr.inrList.get? (List.drop i x ++ List.replicate (min (List.length x) i) false) j = none
mk.inr.inrList.get? (List.drop i x ++ List.replicate (min (List.length x) i) false) j = none
mk.inr.inrList.get? (List.drop i x ++ List.replicate (min (List.length x) i) false) j = none
mk.inr.inrList.length (List.drop i x ++ List.replicate (min (List.length x) i) false) β€ j
mk.inr.inrList.length (List.drop i x ++ List.replicate (min (List.length x) i) false) β€ j
mk.inr.inrList.get? (List.drop i x ++ List.replicate (min (List.length x) i) false) j = noneGoals accomplished! πtheoremGoals accomplished! πget?_ushr (get?_ushr: β {n : β} (x : Bitvec n) (i j : β), List.get? (Vector.toList (ushr x i)) j = if j < Vector.length x then if j < i then some false else List.get? (Vector.toList x) (j - i) else nonex : Bitvecx: Bitvec nn) (n: ?m.243378ii: βj :j: ββ) : (β: Typex.ushrx: Bitvec ni).toList.get?i: βj = ifj: βj <j: βx.length then ifx: Bitvec nj <j: βi then somei: βfalse elsefalse: Boolx.toList.get? (x: Bitvec nj -j: βi) else none :=i: βGoals accomplished! πList.get? (Vector.toList (ushr x i)) j = if j < Vector.length x then if j < i then some false else List.get? (Vector.toList x) (j - i) else noneList.get? (Vector.toList (ushr x i)) j = if j < Vector.length x then if j < i then some false else List.get? (Vector.toList x) (j - i) else none
mkList.get? (Vector.toList (fillShr { val := x, property := (_ : List.length x = List.length x) } i false)) j = if j < Vector.length { val := x, property := (_ : List.length x = List.length x) } then if j < i then some false else List.get? (Vector.toList { val := x, property := (_ : List.length x = List.length x) }) (j - i) else noneList.get? (Vector.toList (ushr x i)) j = if j < Vector.length x then if j < i then some false else List.get? (Vector.toList x) (j - i) else none
mkList.get? (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) j = if j < Vector.length { val := x, property := (_ : List.length x = List.length x) } then if j < i then some false else List.get? x (j - i) else noneList.get? (Vector.toList (ushr x i)) j = if j < Vector.length x then if j < i then some false else List.get? (Vector.toList x) (j - i) else nonei, j: β
x: List Bool
hβ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hβ: j < i
mk.inl.inlList.get? (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) j = some falsei, j: β
x: List Bool
hβ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hβ: Β¬j < i
mk.inl.inrList.get? (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) j = List.get? x (j - i)i, j: β
x: List Bool
hβ: Β¬j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
mk.inrList.get? (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) j = noneList.get? (Vector.toList (ushr x i)) j = if j < Vector.length x then if j < i then some false else List.get? (Vector.toList x) (j - i) else nonei, j: β
x: List Bool
hβ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hβ: j < i
mk.inl.inlList.get? (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) j = some falsei, j: β
x: List Bool
hβ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hβ: j < i
mk.inl.inlList.get? (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) j = some falsei, j: β
x: List Bool
hβ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hβ: Β¬j < i
mk.inl.inrList.get? (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) j = List.get? x (j - i)i, j: β
x: List Bool
hβ: Β¬j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
mk.inrList.get? (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) j = nonei, j: β
x: List Bool
hβ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hβ: j < i
mk.inl.inlList.get? (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) j = some falsei, j: β
x: List Bool
hβ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hβ: j < i
mk.inl.inlList.get? (List.replicate (min (List.length x) i) false) j = some falsei, j: β
x: List Bool
hβ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hβ: j < i
mk.inl.inlj < List.length (List.replicate (min (List.length x) i) false)i, j: β
x: List Bool
hβ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hβ: j < i
mk.inl.inlList.get? (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) j = some falsei, j: β
x: List Bool
hβ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hβ: j < i
mk.inl.inlsome (List.get (List.replicate (min (List.length x) i) false) { val := j, isLt := ?mk.inl.inl }) = some falsei, j: β
x: List Bool
hβ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hβ: j < i
mk.inl.inlj < List.length (List.replicate (min (List.length x) i) false)i, j: β
x: List Bool
hβ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hβ: j < i
mk.inl.inlj < List.length (List.replicate (min (List.length x) i) false)i, j: β
x: List Bool
hβ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hβ: j < i
mk.inl.inlList.get? (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) j = some falsei, j: β
x: List Bool
hβ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hβ: j < i
mk.inl.inli, j: β
x: List Bool
hβ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hβ: j < i
mk.inl.inlj < List.length (List.replicate (min (List.length x) i) false)i, j: β
x: List Bool
hβ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hβ: j < i
mk.inl.inlj < List.length (List.replicate (min (List.length x) i) false)i, j: β
x: List Bool
hβ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hβ: j < i
mk.inl.inlj < List.length (List.replicate (min (List.length x) i) false)i, j: β
x: List Bool
hβ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hβ: j < i
mk.inl.inlj < List.length (List.replicate (min (List.length x) i) false)i, j: β
x: List Bool
hβ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hβ: j < i
mk.inl.inlj < List.length (List.replicate (min (List.length x) i) false)i, j: β
x: List Bool
hβ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hβ: j < i
mk.inl.inlj < List.length (List.replicate (min (List.length x) i) false)i, j: β
x: List Bool
hβ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hβ: j < i
mk.inl.inlList.get? (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) j = some falsei, j: β
x: List Bool
hβ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hβ: Β¬j < i
mk.inl.inrList.get? (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) j = List.get? x (j - i)i, j: β
x: List Bool
hβ: Β¬j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
mk.inrList.get? (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) j = nonei, j: β
x: List Bool
hβ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hβ: j < i
mk.inl.inlj < List.length (List.replicate (min (List.length x) i) false)i, j: β
x: List Bool
hβ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hβ: j < i
mk.inl.inlj < List.length (List.replicate (min (List.length x) i) false)i, j: β
x: List Bool
hβ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hβ: j < i
mk.inl.inlj < List.length (List.replicate (min (List.length x) i) false)i, j: β
x: List Bool
hβ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hβ: j < i
mk.inl.inlj < List.length (List.replicate (min (List.length x) i) false)Goals accomplished! πi, j: β
x: List Bool
hβ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hβ: j < i
mk.inl.inlList.get? (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) j = some falsei, j: β
x: List Bool
hβ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hβ: Β¬j < i
mk.inl.inrList.get? (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) j = List.get? x (j - i)i, j: β
x: List Bool
hβ: Β¬j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
mk.inrList.get? (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) j = nonei, j: β
x: List Bool
hβ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hβ: j < i
mk.inl.inlj < List.length (List.replicate (min (List.length x) i) false)i, j: β
x: List Bool
hβ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hβ: j < i
mk.inl.inlj < List.length (List.replicate (min (List.length x) i) false)Goals accomplished! πi, j: β
x: List Bool
hβ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hβ: Β¬j < i
mk.inl.inrList.get? (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) j = List.get? x (j - i)i, j: β
x: List Bool
hβ: Β¬j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
mk.inrList.get? (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) j = noneList.get? (Vector.toList (ushr x i)) j = if j < Vector.length x then if j < i then some false else List.get? (Vector.toList x) (j - i) else nonei, j: β
x: List Bool
hβ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hβ: Β¬j < i
mk.inl.inrList.get? (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) j = List.get? x (j - i)i, j: β
x: List Bool
hβ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hβ: Β¬j < i
mk.inl.inrList.get? (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) j = List.get? x (j - i)i, j: β
x: List Bool
hβ: Β¬j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
mk.inrList.get? (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) j = nonei, j: β
x: List Bool
hβ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hβ: Β¬j < i
this: i < List.length x
mk.inl.inrList.get? (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) j = List.get? x (j - i)i, j: β
x: List Bool
hβ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hβ: Β¬j < i
mk.inl.inrList.get? (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) j = List.get? x (j - i)i, j: β
x: List Bool
hβ: Β¬j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
mk.inrList.get? (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) j = nonei, j: β
x: List Bool
hβ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hβ: Β¬j < i
this: i < List.length x
mk.inl.inrList.get? (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) j = List.get? x (j - i)i, j: β
x: List Bool
hβ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hβ: Β¬j < i
this: i < List.length x
mk.inl.inrList.get? (List.replicate i false ++ List.take (List.length x - i) x) j = List.get? x (j - i)i, j: β
x: List Bool
hβ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hβ: Β¬j < i
this: i < List.length x
mk.inl.inrList.get? (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) j = List.get? x (j - i)i, j: β
x: List Bool
hβ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hβ: Β¬j < i
this: i < List.length x
mk.inl.inrList.get? (List.take (List.length x - i) x) (j - List.length (List.replicate i false)) = List.get? x (j - i)i, j: β
x: List Bool
hβ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hβ: Β¬j < i
this: i < List.length x
mk.inl.inrList.length (List.replicate i false) β€ ji, j: β
x: List Bool
hβ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hβ: Β¬j < i
this: i < List.length x
mk.inl.inrList.get? (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) j = List.get? x (j - i)i, j: β
x: List Bool
hβ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hβ: Β¬j < i
this: i < List.length x
mk.inl.inrList.get? x (j - List.length (List.replicate i false)) = List.get? x (j - i)i, j: β
x: List Bool
hβ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hβ: Β¬j < i
this: i < List.length x
mk.inl.inrj - List.length (List.replicate i false) < List.length x - ii, j: β
x: List Bool
hβ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hβ: Β¬j < i
this: i < List.length x
mk.inl.inrList.length (List.replicate i false) β€ ji, j: β
x: List Bool
hβ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hβ: Β¬j < i
this: i < List.length x
mk.inl.inrList.get? x (j - List.length (List.replicate i false)) = List.get? x (j - i)i, j: β
x: List Bool
hβ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hβ: Β¬j < i
this: i < List.length x
mk.inl.inrj - List.length (List.replicate i false) < List.length x - ii, j: β
x: List Bool
hβ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hβ: Β¬j < i
this: i < List.length x
mk.inl.inrList.length (List.replicate i false) β€ ji, j: β
x: List Bool
hβ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hβ: Β¬j < i
mk.inl.inrList.get? (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) j = List.get? x (j - i)i, j: β
x: List Bool
hβ: Β¬j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
mk.inrList.get? (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) j = nonei, j: β
x: List Bool
hβ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hβ: Β¬j < i
this: i < List.length x
mk.inl.inrj - List.length (List.replicate i false) < List.length x - ii, j: β
x: List Bool
hβ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hβ: Β¬j < i
this: i < List.length x
mk.inl.inrList.length (List.replicate i false) β€ ji, j: β
x: List Bool
hβ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hβ: Β¬j < i
mk.inl.inrList.get? (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) j = List.get? x (j - i)i, j: β
x: List Bool
hβ: Β¬j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
mk.inrList.get? (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) j = nonei, j: β
x: List Bool
hβ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hβ: Β¬j < i
this: i < List.length x
mk.inl.inrj - List.length (List.replicate i false) < List.length x - ii, j: β
x: List Bool
hβ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hβ: Β¬j < i
this: i < List.length x
mk.inl.inrj - List.length (List.replicate i false) < List.length x - ii, j: β
x: List Bool
hβ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hβ: Β¬j < i
this: i < List.length x
mk.inl.inrList.length (List.replicate i false) β€ ji, j: β
x: List Bool
hβ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hβ: Β¬j < i
this: i < List.length x
mk.inl.inrj - List.length (List.replicate i false) < List.length x - iGoals accomplished! πi, j: β
x: List Bool
hβ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hβ: Β¬j < i
this: i < List.length xList.length (List.replicate i false) β€ jGoals accomplished! πi, j: β
x: List Bool
hβ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hβ: Β¬j < i
this: i < List.length x
mk.inl.inrj - List.length (List.replicate i false) < List.length x - iGoals accomplished! πi, j: β
x: List Bool
hβ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hβ: Β¬j < i
this: i < List.length xj < List.length (List.replicate i false) + (List.length x - i)Goals accomplished! πGoals accomplished! πi, j: β
x: List Bool
hβ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hβ: Β¬j < i
mk.inl.inrList.get? (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) j = List.get? x (j - i)i, j: β
x: List Bool
hβ: Β¬j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
mk.inrList.get? (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) j = nonei, j: β
x: List Bool
hβ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hβ: Β¬j < i
this: i < List.length x
mk.inl.inrList.length (List.replicate i false) β€ ji, j: β
x: List Bool
hβ: j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
hβ: Β¬j < i
this: i < List.length x
mk.inl.inrList.length (List.replicate i false) β€ jGoals accomplished! πi, j: β
x: List Bool
hβ: Β¬j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
mk.inrList.get? (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) j = noneList.get? (Vector.toList (ushr x i)) j = if j < Vector.length x then if j < i then some false else List.get? (Vector.toList x) (j - i) else nonei, j: β
x: List Bool
hβ: Β¬j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
mk.inrList.get? (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) j = nonei, j: β
x: List Bool
hβ: Β¬j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
mk.inrList.get? (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) j = nonei, j: β
x: List Bool
hβ: Β¬j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
mk.inrList.get? (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) j = nonei, j: β
x: List Bool
hβ: Β¬j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
mk.inrList.length (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) β€ ji, j: β
x: List Bool
hβ: Β¬j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
mk.inrList.length (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) β€ ji, j: β
x: List Bool
hβ: Β¬j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
mk.inrList.get? (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) j = nonei, j: β
x: List Bool
hβ: Β¬j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
mk.inrList.length (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) β€ ji, j: β
x: List Bool
hβ: Β¬j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
mk.inrList.length (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) β€ ji, j: β
x: List Bool
hβ: Β¬j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
mk.inrList.length (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) β€ ji, j: β
x: List Bool
hβ: Β¬j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
mk.inrList.length (List.replicate (if List.length x β€ i then List.length x else i) false ++ List.take (List.length x - i) x) β€ ji, j: β
x: List Bool
hβ: Β¬j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
mk.inrList.length (List.replicate (if List.length x β€ i then List.length x else i) false ++ List.take (List.length x - i) x) β€ ji, j: β
x: List Bool
hβ: Β¬j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
mk.inrList.length (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) β€ ji, j: β
x: List Bool
hβ: Β¬j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
h: List.length x β€ i
mk.inr.inlList.length (List.replicate (List.length x) false ++ List.take (List.length x - i) x) β€ ji, j: β
x: List Bool
hβ: Β¬j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
h: Β¬List.length x β€ i
mk.inr.inrList.length (List.replicate i false ++ List.take (List.length x - i) x) β€ ji, j: β
x: List Bool
hβ: Β¬j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
mk.inrList.length (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) β€ ji, j: β
x: List Bool
hβ: Β¬j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
h: List.length x β€ i
mk.inr.inlList.length (List.replicate (List.length x) false ++ List.take (List.length x - i) x) β€ ji, j: β
x: List Bool
hβ: Β¬j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
h: List.length x β€ i
mk.inr.inlList.length (List.replicate (List.length x) false ++ List.take (List.length x - i) x) β€ ji, j: β
x: List Bool
hβ: Β¬j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
h: Β¬List.length x β€ i
mk.inr.inrList.length (List.replicate i false ++ List.take (List.length x - i) x) β€ jGoals accomplished! πi, j: β
x: List Bool
hβ: Β¬j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
h: Β¬List.length x β€ i
mk.inr.inrList.length (List.replicate i false ++ List.take (List.length x - i) x) β€ ji, j: β
x: List Bool
hβ: Β¬j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
mk.inrList.length (List.replicate (min (List.length x) i) false ++ List.take (List.length x - i) x) β€ ji, j: β
x: List Bool
hβ: Β¬j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
h: Β¬List.length x β€ i
mk.inr.inrList.length (List.replicate i false ++ List.take (List.length x - i) x) β€ ji, j: β
x: List Bool
hβ: Β¬j < Vector.length { val := x, property := (_ : List.length x = List.length x) }
h: Β¬List.length x β€ i
mk.inr.inrList.length (List.replicate i false ++ List.take (List.length x - i) x) β€ jGoals accomplished! πGoals accomplished! πtheoremGoals accomplished! πget?_and (get?_and: β {n : β} (x y : Bitvec n) (i : β), List.get? (Vector.toList (Bitvec.and x y)) i = do let __do_lift β List.get? (Vector.toList x) i let __do_lift_1 β List.get? (Vector.toList y) i pure (__do_lift && __do_lift_1)xx: Bitvec ny : Bitvecy: Bitvec nn) (n: ?m.261948i :i: ββ) : (β: Typex.andx: Bitvec ny).toList.get?y: Bitvec ni = do returni: β(β(β x.toList.get? i): ?m.262050xx: Bitvec n.toList(β x.toList.get? i): ?m.262050.get?(β x.toList.get? i): ?m.262050(β x.toList.get? i): ?m.262050ii: β) &&(β x.toList.get? i): ?m.262050(β(β y.toList.get? i): ?m.262105yy: Bitvec n.toList(β y.toList.get? i): ?m.262105.get?(β y.toList.get? i): ?m.262105(β y.toList.get? i): ?m.262105ii: β) :=(β y.toList.get? i): ?m.262105Goals accomplished! πList.get? (Vector.toList (Bitvec.and x y)) i = do let __do_lift β List.get? (Vector.toList x) i let __do_lift_1 β List.get? (Vector.toList y) i pure (__do_lift && __do_lift_1)
mkList.get? (Vector.toList (Bitvec.and { val := x, property := (_ : List.length x = List.length x) } y)) i = do let __do_lift β List.get? (Vector.toList { val := x, property := (_ : List.length x = List.length x) }) i let __do_lift_1 β List.get? (Vector.toList y) i pure (__do_lift && __do_lift_1)List.get? (Vector.toList (Bitvec.and x y)) i = do let __do_lift β List.get? (Vector.toList x) i let __do_lift_1 β List.get? (Vector.toList y) i pure (__do_lift && __do_lift_1)
mk.mkList.get? (Vector.toList (Bitvec.and { val := x, property := (_ : List.length x = List.length x) } { val := y, property := hy })) i = do let __do_lift β List.get? (Vector.toList { val := x, property := (_ : List.length x = List.length x) }) i let __do_lift_1 β List.get? (Vector.toList { val := y, property := hy }) i pure (__do_lift && __do_lift_1)List.get? (Vector.toList (Bitvec.and x y)) i = do let __do_lift β List.get? (Vector.toList x) i let __do_lift_1 β List.get? (Vector.toList y) i pure (__do_lift && __do_lift_1)
mk.mk(Option.bind (Option.map and (List.get? x i)) fun g => Option.map g (List.get? y i)) = do let __do_lift β List.get? x i let __do_lift_1 β List.get? y i pure (__do_lift && __do_lift_1)List.get? (Vector.toList (Bitvec.and x y)) i = do let __do_lift β List.get? (Vector.toList x) i let __do_lift_1 β List.get? (Vector.toList y) i pure (__do_lift && __do_lift_1)
mk.mk.none(Option.bind (Option.map and none) fun g => Option.map g (List.get? y i)) = do let __do_lift β none let __do_lift_1 β List.get? y i pure (__do_lift && __do_lift_1)
mk.mk.some(Option.bind (Option.map and (some valβ)) fun g => Option.map g (List.get? y i)) = do let __do_lift β some valβ let __do_lift_1 β List.get? y i pure (__do_lift && __do_lift_1)
mk.mk(Option.bind (Option.map and (List.get? x i)) fun g => Option.map g (List.get? y i)) = do let __do_lift β List.get? x i let __do_lift_1 β List.get? y i pure (__do_lift && __do_lift_1)
mk.mk.none(Option.bind (Option.map and none) fun g => Option.map g (List.get? y i)) = do let __do_lift β none let __do_lift_1 β List.get? y i pure (__do_lift && __do_lift_1)
mk.mk.some(Option.bind (Option.map and (some valβ)) fun g => Option.map g (List.get? y i)) = do let __do_lift β some valβ let __do_lift_1 β List.get? y i pure (__do_lift && __do_lift_1)
mk.mk(Option.bind (Option.map and (List.get? x i)) fun g => Option.map g (List.get? y i)) = do let __do_lift β List.get? x i let __do_lift_1 β List.get? y i pure (__do_lift && __do_lift_1)
mk.mk.none.none(Option.bind (Option.map and none) fun g => Option.map g none) = do let __do_lift β none let __do_lift_1 β none pure (__do_lift && __do_lift_1)
mk.mk.none.some(Option.bind (Option.map and none) fun g => Option.map g (some valβ)) = do let __do_lift β none let __do_lift_1 β some valβ pure (__do_lift && __do_lift_1)
mk.mk(Option.bind (Option.map and (List.get? x i)) fun g => Option.map g (List.get? y i)) = do let __do_lift β List.get? x i let __do_lift_1 β List.get? y i pure (__do_lift && __do_lift_1)
mk.mk.none.none(Option.bind (Option.map and none) fun g => Option.map g none) = do let __do_lift β none let __do_lift_1 β none pure (__do_lift && __do_lift_1)
mk.mk.none.some(Option.bind (Option.map and none) fun g => Option.map g (some valβ)) = do let __do_lift β none let __do_lift_1 β some valβ pure (__do_lift && __do_lift_1)
mk.mk.some.none(Option.bind (Option.map and (some valβ)) fun g => Option.map g none) = do let __do_lift β some valβ let __do_lift_1 β none pure (__do_lift && __do_lift_1)
mk.mk.some.some(Option.bind (Option.map and (some valβΒΉ)) fun g => Option.map g (some valβ)) = do let __do_lift β some valβΒΉ let __do_lift_1 β some valβ pure (__do_lift && __do_lift_1)
mk.mk(Option.bind (Option.map and (List.get? x i)) fun g => Option.map g (List.get? y i)) = do let __do_lift β List.get? x i let __do_lift_1 β List.get? y i pure (__do_lift && __do_lift_1)theoremGoals accomplished! πget?_ofInt_neg_one : (Bitvec.ofIntget?_ofInt_neg_one: β {w i : β}, List.get? (Vector.toList (Bitvec.ofInt w (-1))) i = if i β€ w then some true else nonew (-w: ?m.3132131)).toList.get?1: ?m.313262i = ifi: ?m.313256i β€i: ?m.313256w then somew: ?m.313213true else none :=true: BoolGoals accomplished! πw, i: βList.get? (Vector.toList (Bitvec.ofInt w (-1))) i = if i β€ w then some true else nonew, i: βList.get? (Vector.toList (true ::α΅₯ Bitvec.not (Bitvec.ofNat w 0))) i = if i β€ w then some true else nonew, i: βList.get? (Vector.toList (Bitvec.ofInt w (-1))) i = if i β€ w then some true else nonew, i: βList.get? (Vector.toList (Bitvec.ofInt w (-1))) i = if i β€ w then some true else nonew, i: βList.get? (Vector.toList (Bitvec.ofInt w (-1))) i = if i β€ w then some true else nonew, i: βList.get? (Vector.toList (Bitvec.ofInt w (-1))) i = if i β€ w then some true else none
inli < List.length (List.replicate (w + 1) true)
inli < List.length (List.replicate (w + 1) true)
inli < List.length (List.replicate (w + 1) true)
inli < List.length (List.replicate (w + 1) true)Goals accomplished! πw, i: βList.get? (Vector.toList (Bitvec.ofInt w (-1))) i = if i β€ w then some true else none
inrList.length (List.replicate (w + 1) true) β€ i
inrList.length (List.replicate (w + 1) true) β€ iGoals accomplished! π-- from InstCombine/Shift:279 theoremGoals accomplished! πshl_ushr_eq_and_shl {shl_ushr_eq_and_shl: β {w : β} {x C : Bitvec (Nat.succ w)}, shl (ushr x (Bitvec.toNat C)) (Bitvec.toNat C) = Bitvec.and x (shl (Bitvec.ofInt w (-1)) (Bitvec.toNat C))w :w: βNat} {x C : BitvecNat: Typew.succ} : Bitvec.shl (Bitvec.ushr x C.toNat) C.toNat = Bitvec.and x (Bitvec.shl (Bitvec.ofIntw: βw (-w: β1)) C.toNat) :=1: ?m.316004Goals accomplished! πshl (ushr x (Bitvec.toNat C)) (Bitvec.toNat C) = Bitvec.and x (shl (Bitvec.ofInt w (-1)) (Bitvec.toNat C))
hβ (i : β), List.get? (Vector.toList (shl (ushr x (Bitvec.toNat C)) (Bitvec.toNat C))) i = List.get? (Vector.toList (Bitvec.and x (shl (Bitvec.ofInt w (-1)) (Bitvec.toNat C)))) ishl (ushr x (Bitvec.toNat C)) (Bitvec.toNat C) = Bitvec.and x (shl (Bitvec.ofInt w (-1)) (Bitvec.toNat C))
hList.get? (Vector.toList (shl (ushr x (Bitvec.toNat C)) (Bitvec.toNat C))) i = List.get? (Vector.toList (Bitvec.and x (shl (Bitvec.ofInt w (-1)) (Bitvec.toNat C)))) ishl (ushr x (Bitvec.toNat C)) (Bitvec.toNat C) = Bitvec.and x (shl (Bitvec.ofInt w (-1)) (Bitvec.toNat C))
hList.get? (Vector.toList (shl (ushr x (Bitvec.toNat C)) (Bitvec.toNat C))) i = List.get? (Vector.toList (Bitvec.and x (shl (Bitvec.ofInt w (-1)) (Bitvec.toNat C)))) i
h(if Bitvec.toNat C + i < Nat.succ w then List.get? (Vector.toList (ushr x (Bitvec.toNat C))) (Bitvec.toNat C + i) else if i < Nat.succ w then some false else none) = List.get? (Vector.toList (Bitvec.and x (shl (Bitvec.ofInt w (-1)) (Bitvec.toNat C)))) i
hList.get? (Vector.toList (shl (ushr x (Bitvec.toNat C)) (Bitvec.toNat C))) i = List.get? (Vector.toList (Bitvec.and x (shl (Bitvec.ofInt w (-1)) (Bitvec.toNat C)))) i
h(if Bitvec.toNat C + i < Nat.succ w then if Bitvec.toNat C + i < Vector.length x then if Bitvec.toNat C + i < Bitvec.toNat C then some false else List.get? (Vector.toList x) (Bitvec.toNat C + i - Bitvec.toNat C) else none else if i < Nat.succ w then some false else none) = List.get? (Vector.toList (Bitvec.and x (shl (Bitvec.ofInt w (-1)) (Bitvec.toNat C)))) i
hList.get? (Vector.toList (shl (ushr x (Bitvec.toNat C)) (Bitvec.toNat C))) i = List.get? (Vector.toList (Bitvec.and x (shl (Bitvec.ofInt w (-1)) (Bitvec.toNat C)))) i
h(if Bitvec.toNat C + i < Nat.succ w then if Bitvec.toNat C + i < Vector.length x then if Bitvec.toNat C + i < Bitvec.toNat C then some false else List.get? (Vector.toList x) (Bitvec.toNat C + i - Bitvec.toNat C) else none else if i < Nat.succ w then some false else none) = do let __do_lift β List.get? (Vector.toList x) i let __do_lift_1 β List.get? (Vector.toList (shl (Bitvec.ofInt w (-1)) (Bitvec.toNat C))) i pure (__do_lift && __do_lift_1)
h(if Bitvec.toNat C + i < Nat.succ w then if Bitvec.toNat C + i < Vector.length x then if Bitvec.toNat C + i < Bitvec.toNat C then some false else List.get? (Vector.toList x) (Bitvec.toNat C + i - Bitvec.toNat C) else none else if i < Nat.succ w then some false else none) = do let __do_lift β List.get? (Vector.toList x) i let __do_lift_1 β List.get? (Vector.toList (shl (Bitvec.ofInt w (-1)) (Bitvec.toNat C))) i pure (__do_lift && __do_lift_1)shl (ushr x (Bitvec.toNat C)) (Bitvec.toNat C) = Bitvec.and x (shl (Bitvec.ofInt w (-1)) (Bitvec.toNat C))
h(if Bitvec.toNat C + i β€ w then if Bitvec.toNat C + i β€ w then if Bitvec.toNat C + i < Bitvec.toNat C then some false else List.get? (Vector.toList x) (Bitvec.toNat C + i - Bitvec.toNat C) else none else if i β€ w then some false else none) = Option.bind (List.get? (Vector.toList x) i) fun __do_lift => Option.bind (if Bitvec.toNat C + i β€ w then if Bitvec.toNat C + i β€ w then some true else none else if i β€ w then some false else none) fun __do_lift_1 => some (__do_lift && __do_lift_1)shl (ushr x (Bitvec.toNat C)) (Bitvec.toNat C) = Bitvec.and x (shl (Bitvec.ofInt w (-1)) (Bitvec.toNat C))w: β
x, C: Bitvec (Nat.succ w)
i: β
hβ: Bitvec.toNat C + i β€ w
hβ: Bitvec.toNat C + i < Bitvec.toNat C
h.inl.inlsome false = Option.bind (List.get? (Vector.toList x) i) fun __do_lift => Option.bind (some true) fun __do_lift_1 => some (__do_lift && __do_lift_1)w: β
x, C: Bitvec (Nat.succ w)
i: β
hβ: Bitvec.toNat C + i β€ w
hβ: Β¬Bitvec.toNat C + i < Bitvec.toNat C
h.inl.inrList.get? (Vector.toList x) (Bitvec.toNat C + i - Bitvec.toNat C) = Option.bind (List.get? (Vector.toList x) i) fun __do_lift => Option.bind (some true) fun __do_lift_1 => some (__do_lift && __do_lift_1)
h.inr.inlsome false = Option.bind (List.get? (Vector.toList x) i) fun __do_lift => Option.bind (some false) fun __do_lift_1 => some (__do_lift && __do_lift_1)
h.inr.inrnone = Option.bind (List.get? (Vector.toList x) i) fun __do_lift => Option.bind none fun __do_lift_1 => some (__do_lift && __do_lift_1)shl (ushr x (Bitvec.toNat C)) (Bitvec.toNat C) = Bitvec.and x (shl (Bitvec.ofInt w (-1)) (Bitvec.toNat C))w: β
x, C: Bitvec (Nat.succ w)
i: β
hβ: Bitvec.toNat C + i β€ w
hβ: Bitvec.toNat C + i < Bitvec.toNat C
h.inl.inlsome false = Option.bind (List.get? (Vector.toList x) i) fun __do_lift => Option.bind (some true) fun __do_lift_1 => some (__do_lift && __do_lift_1)w: β
x, C: Bitvec (Nat.succ w)
i: β
hβ: Bitvec.toNat C + i β€ w
hβ: Bitvec.toNat C + i < Bitvec.toNat C
h.inl.inlsome false = Option.bind (List.get? (Vector.toList x) i) fun __do_lift => Option.bind (some true) fun __do_lift_1 => some (__do_lift && __do_lift_1)w: β
x, C: Bitvec (Nat.succ w)
i: β
hβ: Bitvec.toNat C + i β€ w
hβ: Β¬Bitvec.toNat C + i < Bitvec.toNat C
h.inl.inrList.get? (Vector.toList x) (Bitvec.toNat C + i - Bitvec.toNat C) = Option.bind (List.get? (Vector.toList x) i) fun __do_lift => Option.bind (some true) fun __do_lift_1 => some (__do_lift && __do_lift_1)
h.inr.inlsome false = Option.bind (List.get? (Vector.toList x) i) fun __do_lift => Option.bind (some false) fun __do_lift_1 => some (__do_lift && __do_lift_1)
h.inr.inrnone = Option.bind (List.get? (Vector.toList x) i) fun __do_lift => Option.bind none fun __do_lift_1 => some (__do_lift && __do_lift_1)Goals accomplished! πw: β
x, C: Bitvec (Nat.succ w)
i: β
hβ: Bitvec.toNat C + i β€ w
hβ: Β¬Bitvec.toNat C + i < Bitvec.toNat C
h.inl.inrList.get? (Vector.toList x) (Bitvec.toNat C + i - Bitvec.toNat C) = Option.bind (List.get? (Vector.toList x) i) fun __do_lift => Option.bind (some true) fun __do_lift_1 => some (__do_lift && __do_lift_1)
h.inr.inlsome false = Option.bind (List.get? (Vector.toList x) i) fun __do_lift => Option.bind (some false) fun __do_lift_1 => some (__do_lift && __do_lift_1)
h.inr.inrnone = Option.bind (List.get? (Vector.toList x) i) fun __do_lift => Option.bind none fun __do_lift_1 => some (__do_lift && __do_lift_1)shl (ushr x (Bitvec.toNat C)) (Bitvec.toNat C) = Bitvec.and x (shl (Bitvec.ofInt w (-1)) (Bitvec.toNat C))w: β
x, C: Bitvec (Nat.succ w)
i: β
hβ: Bitvec.toNat C + i β€ w
hβ: Β¬Bitvec.toNat C + i < Bitvec.toNat C
h.inl.inrList.get? (Vector.toList x) (Bitvec.toNat C + i - Bitvec.toNat C) = Option.bind (List.get? (Vector.toList x) i) fun __do_lift => Option.bind (some true) fun __do_lift_1 => some (__do_lift && __do_lift_1)w: β
x, C: Bitvec (Nat.succ w)
i: β
hβ: Bitvec.toNat C + i β€ w
hβ: Β¬Bitvec.toNat C + i < Bitvec.toNat C
h.inl.inrList.get? (Vector.toList x) (Bitvec.toNat C + i - Bitvec.toNat C) = Option.bind (List.get? (Vector.toList x) i) fun __do_lift => Option.bind (some true) fun __do_lift_1 => some (__do_lift && __do_lift_1)
h.inr.inlsome false = Option.bind (List.get? (Vector.toList x) i) fun __do_lift => Option.bind (some false) fun __do_lift_1 => some (__do_lift && __do_lift_1)
h.inr.inrnone = Option.bind (List.get? (Vector.toList x) i) fun __do_lift => Option.bind none fun __do_lift_1 => some (__do_lift && __do_lift_1)Goals accomplished! π
h.inr.inlsome false = Option.bind (List.get? (Vector.toList x) i) fun __do_lift => Option.bind (some false) fun __do_lift_1 => some (__do_lift && __do_lift_1)
h.inr.inrnone = Option.bind (List.get? (Vector.toList x) i) fun __do_lift => Option.bind none fun __do_lift_1 => some (__do_lift && __do_lift_1)shl (ushr x (Bitvec.toNat C)) (Bitvec.toNat C) = Bitvec.and x (shl (Bitvec.ofInt w (-1)) (Bitvec.toNat C))
h.inr.inlsome false = Option.bind (List.get? (Vector.toList x) i) fun __do_lift => Option.bind (some false) fun __do_lift_1 => some (__do_lift && __do_lift_1)
h.inr.inlsome false = Option.bind (List.get? (Vector.toList x) i) fun __do_lift => Option.bind (some false) fun __do_lift_1 => some (__do_lift && __do_lift_1)
h.inr.inrnone = Option.bind (List.get? (Vector.toList x) i) fun __do_lift => Option.bind none fun __do_lift_1 => some (__do_lift && __do_lift_1)
h.inr.inlsome false = Option.bind (List.get? (Vector.toList x) i) fun __do_lift => Option.bind (some false) fun __do_lift_1 => some (__do_lift && __do_lift_1)
h.inr.inlsome false = Option.bind (some (List.get (Vector.toList x) { val := i, isLt := ?h.inr.inl })) fun __do_lift => Option.bind (some false) fun __do_lift_1 => some (__do_lift && __do_lift_1)
h.inr.inli < List.length (Vector.toList x)
h.inr.inlsome false = Option.bind (some (List.get (Vector.toList x) { val := i, isLt := ?h.inr.inl })) fun __do_lift => Option.bind (some false) fun __do_lift_1 => some (__do_lift && __do_lift_1)
h.inr.inli < List.length (Vector.toList x)
h.inr.inlsome false = Option.bind (List.get? (Vector.toList x) i) fun __do_lift => Option.bind (some false) fun __do_lift_1 => some (__do_lift && __do_lift_1)
h.inr.inlsome false = Option.bind (some (List.get (Vector.toList x) { val := i, isLt := ?h.inr.inl })) fun __do_lift => Option.bind (some false) fun __do_lift_1 => some (__do_lift && __do_lift_1)
h.inr.inli < List.length (Vector.toList x)
h.inr.inlsome false = Option.bind (List.get? (Vector.toList x) i) fun __do_lift => Option.bind (some false) fun __do_lift_1 => some (__do_lift && __do_lift_1)Goals accomplished! π
h.inr.inrnone = Option.bind (List.get? (Vector.toList x) i) fun __do_lift => Option.bind none fun __do_lift_1 => some (__do_lift && __do_lift_1)shl (ushr x (Bitvec.toNat C)) (Bitvec.toNat C) = Bitvec.and x (shl (Bitvec.ofInt w (-1)) (Bitvec.toNat C))
h.inr.inrnone = Option.bind (List.get? (Vector.toList x) i) fun __do_lift => Option.bind none fun __do_lift_1 => some (__do_lift && __do_lift_1)
h.inr.inrnone = Option.bind (List.get? (Vector.toList x) i) fun __do_lift => Option.bind none fun __do_lift_1 => some (__do_lift && __do_lift_1)
h.inr.inrnone = Option.bind (List.get? (Vector.toList x) i) fun __do_lift => Option.bind none fun __do_lift_1 => some (__do_lift && __do_lift_1)
h.inr.inrnone = Option.bind none fun __do_lift => Option.bind none fun __do_lift_1 => some (__do_lift && __do_lift_1)
h.inr.inrList.length (Vector.toList x) β€ i
h.inr.inrnone = Option.bind none fun __do_lift => Option.bind none fun __do_lift_1 => some (__do_lift && __do_lift_1)
h.inr.inrList.length (Vector.toList x) β€ i
h.inr.inrnone = Option.bind (List.get? (Vector.toList x) i) fun __do_lift => Option.bind none fun __do_lift_1 => some (__do_lift && __do_lift_1)
h.inr.inrnone = Option.bind none fun __do_lift => Option.bind none fun __do_lift_1 => some (__do_lift && __do_lift_1)
h.inr.inrList.length (Vector.toList x) β€ i
h.inr.inrnone = Option.bind (List.get? (Vector.toList x) i) fun __do_lift => Option.bind none fun __do_lift_1 => some (__do_lift && __do_lift_1)Goals accomplished! π
h.inr.inrnone = Option.bind (List.get? (Vector.toList x) i) fun __do_lift => Option.bind none fun __do_lift_1 => some (__do_lift && __do_lift_1)Goals accomplished! πtheoremGoals accomplished! πtoInt_injective : β {toInt_injective: β {w : β}, Function.Injective Bitvec.toIntw :w: βNat}, Function.Injective (Bitvec.toInt : BitvecNat: Typew βw: ββ€) |β€: Type0, β¨[],0: β_β©, β¨[], _β©, rfl => rfl |_: List.length [] = 0n+n: β1, β¨1: βa::x,a: Boolhxβ©, β¨hx: List.length (a :: x) = n + 1b::y,b: Boolhyβ©,hy: List.length (b :: y) = n + 1h =>h: Bitvec.toInt { val := a :: x, property := hx } = Bitvec.toInt { val := b :: y, property := hy }Goals accomplished! πn: β
a: Bool
x: List Bool
hx: List.length (a :: x) = n + 1
b: Bool
y: List Bool
hy: List.length (b :: y) = n + 1
h: (bif a then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := a :: x, property := hx }))) else β(Bitvec.toNat (Vector.tail { val := a :: x, property := hx }))) = bif b then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := b :: y, property := hy }))) else β(Bitvec.toNat (Vector.tail { val := b :: y, property := hy }))n: β
a: Bool
x: List Bool
hx: List.length (a :: x) = n + 1
b: Bool
y: List Bool
hy: List.length (b :: y) = n + 1
h: (bif a then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := a :: x, property := hx }))) else β(Bitvec.toNat (Vector.tail { val := a :: x, property := hx }))) = bif b then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := b :: y, property := hy }))) else β(Bitvec.toNat (Vector.tail { val := b :: y, property := hy }))
aVector.toList { val := a :: x, property := hx } = Vector.toList { val := b :: y, property := hy }n: β
x: List Bool
b: Bool
y: List Bool
hy: List.length (b :: y) = n + 1
hx: List.length (false :: x) = n + 1
h: (bif false then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := false :: x, property := hx }))) else β(Bitvec.toNat (Vector.tail { val := false :: x, property := hx }))) = bif b then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := b :: y, property := hy }))) else β(Bitvec.toNat (Vector.tail { val := b :: y, property := hy }))
a.falseVector.toList { val := false :: x, property := hx } = Vector.toList { val := b :: y, property := hy }n: β
x: List Bool
b: Bool
y: List Bool
hy: List.length (b :: y) = n + 1
hx: List.length (true :: x) = n + 1
h: (bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: x, property := hx }))) else β(Bitvec.toNat (Vector.tail { val := true :: x, property := hx }))) = bif b then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := b :: y, property := hy }))) else β(Bitvec.toNat (Vector.tail { val := b :: y, property := hy }))
a.trueVector.toList { val := true :: x, property := hx } = Vector.toList { val := b :: y, property := hy }n: β
a: Bool
x: List Bool
hx: List.length (a :: x) = n + 1
b: Bool
y: List Bool
hy: List.length (b :: y) = n + 1
h: (bif a then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := a :: x, property := hx }))) else β(Bitvec.toNat (Vector.tail { val := a :: x, property := hx }))) = bif b then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := b :: y, property := hy }))) else β(Bitvec.toNat (Vector.tail { val := b :: y, property := hy }))
aVector.toList { val := a :: x, property := hx } = Vector.toList { val := b :: y, property := hy }n: β
x: List Bool
b: Bool
y: List Bool
hy: List.length (b :: y) = n + 1
hx: List.length (false :: x) = n + 1
h: (bif false then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := false :: x, property := hx }))) else β(Bitvec.toNat (Vector.tail { val := false :: x, property := hx }))) = bif b then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := b :: y, property := hy }))) else β(Bitvec.toNat (Vector.tail { val := b :: y, property := hy }))
a.falseVector.toList { val := false :: x, property := hx } = Vector.toList { val := b :: y, property := hy }n: β
x: List Bool
b: Bool
y: List Bool
hy: List.length (b :: y) = n + 1
hx: List.length (true :: x) = n + 1
h: (bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: x, property := hx }))) else β(Bitvec.toNat (Vector.tail { val := true :: x, property := hx }))) = bif b then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := b :: y, property := hy }))) else β(Bitvec.toNat (Vector.tail { val := b :: y, property := hy }))
a.trueVector.toList { val := true :: x, property := hx } = Vector.toList { val := b :: y, property := hy }n: β
a: Bool
x: List Bool
hx: List.length (a :: x) = n + 1
b: Bool
y: List Bool
hy: List.length (b :: y) = n + 1
h: (bif a then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := a :: x, property := hx }))) else β(Bitvec.toNat (Vector.tail { val := a :: x, property := hx }))) = bif b then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := b :: y, property := hy }))) else β(Bitvec.toNat (Vector.tail { val := b :: y, property := hy }))
aVector.toList { val := a :: x, property := hx } = Vector.toList { val := b :: y, property := hy }n: β
x, y: List Bool
hx: List.length (true :: x) = n + 1
hy: List.length (false :: y) = n + 1
h: (bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: x, property := hx }))) else β(Bitvec.toNat (Vector.tail { val := true :: x, property := hx }))) = bif false then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := false :: y, property := hy }))) else β(Bitvec.toNat (Vector.tail { val := false :: y, property := hy }))
a.true.falseVector.toList { val := true :: x, property := hx } = Vector.toList { val := false :: y, property := hy }n: β
x, y: List Bool
hx: List.length (true :: x) = n + 1
hy: List.length (true :: y) = n + 1
h: (bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: x, property := hx }))) else β(Bitvec.toNat (Vector.tail { val := true :: x, property := hx }))) = bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: y, property := hy }))) else β(Bitvec.toNat (Vector.tail { val := true :: y, property := hy }))
a.true.trueVector.toList { val := true :: x, property := hx } = Vector.toList { val := true :: y, property := hy }n: β
x, y: List Bool
hx: List.length (false :: x) = n + 1
hy: List.length (false :: y) = n + 1
h: (bif false then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := false :: x, property := hx }))) else β(Bitvec.toNat (Vector.tail { val := false :: x, property := hx }))) = bif false then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := false :: y, property := hy }))) else β(Bitvec.toNat (Vector.tail { val := false :: y, property := hy }))
a.false.falseVector.toList { val := false :: x, property := hx } = Vector.toList { val := false :: y, property := hy }n: β
x, y: List Bool
hx: List.length (false :: x) = n + 1
hy: List.length (false :: y) = n + 1
h: (bif false then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := false :: x, property := hx }))) else β(Bitvec.toNat (Vector.tail { val := false :: x, property := hx }))) = bif false then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := false :: y, property := hy }))) else β(Bitvec.toNat (Vector.tail { val := false :: y, property := hy }))
a.false.falseVector.toList { val := false :: x, property := hx } = Vector.toList { val := false :: y, property := hy }n: β
x, y: List Bool
hx: List.length (false :: x) = n + 1
hy: List.length (true :: y) = n + 1
h: (bif false then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := false :: x, property := hx }))) else β(Bitvec.toNat (Vector.tail { val := false :: x, property := hx }))) = bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: y, property := hy }))) else β(Bitvec.toNat (Vector.tail { val := true :: y, property := hy }))
a.false.trueVector.toList { val := false :: x, property := hx } = Vector.toList { val := true :: y, property := hy }n: β
x, y: List Bool
hx: List.length (true :: x) = n + 1
hy: List.length (false :: y) = n + 1
h: (bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: x, property := hx }))) else β(Bitvec.toNat (Vector.tail { val := true :: x, property := hx }))) = bif false then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := false :: y, property := hy }))) else β(Bitvec.toNat (Vector.tail { val := false :: y, property := hy }))
a.true.falseVector.toList { val := true :: x, property := hx } = Vector.toList { val := false :: y, property := hy }n: β
x, y: List Bool
hx: List.length (true :: x) = n + 1
hy: List.length (true :: y) = n + 1
h: (bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: x, property := hx }))) else β(Bitvec.toNat (Vector.tail { val := true :: x, property := hx }))) = bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: y, property := hy }))) else β(Bitvec.toNat (Vector.tail { val := true :: y, property := hy }))
a.true.trueVector.toList { val := true :: x, property := hx } = Vector.toList { val := true :: y, property := hy }n: β
x, y: List Bool
hx: List.length (false :: x) = n + 1
hy: List.length (false :: y) = n + 1
h: Bitvec.toNat { val := x, property := (_ : Nat.pred (List.length (false :: x)) = Nat.pred (Nat.succ (n + 0))) } = Bitvec.toNat { val := y, property := (_ : Nat.pred (List.length (false :: y)) = Nat.pred (Nat.succ (n + 0))) }
a.false.falseVector.toList { val := false :: x, property := hx } = Vector.toList { val := false :: y, property := hy }n: β
x, y: List Bool
hx: List.length (false :: x) = n + 1
hy: List.length (false :: y) = n + 1
h: (bif false then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := false :: x, property := hx }))) else β(Bitvec.toNat (Vector.tail { val := false :: x, property := hx }))) = bif false then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := false :: y, property := hy }))) else β(Bitvec.toNat (Vector.tail { val := false :: y, property := hy }))
a.false.falseVector.toList { val := false :: x, property := hx } = Vector.toList { val := false :: y, property := hy }n: β
x, y: List Bool
hx: List.length (false :: x) = n + 1
hy: List.length (true :: y) = n + 1
h: (bif false then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := false :: x, property := hx }))) else β(Bitvec.toNat (Vector.tail { val := false :: x, property := hx }))) = bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: y, property := hy }))) else β(Bitvec.toNat (Vector.tail { val := true :: y, property := hy }))
a.false.trueVector.toList { val := false :: x, property := hx } = Vector.toList { val := true :: y, property := hy }n: β
x, y: List Bool
hx: List.length (true :: x) = n + 1
hy: List.length (false :: y) = n + 1
h: (bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: x, property := hx }))) else β(Bitvec.toNat (Vector.tail { val := true :: x, property := hx }))) = bif false then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := false :: y, property := hy }))) else β(Bitvec.toNat (Vector.tail { val := false :: y, property := hy }))
a.true.falseVector.toList { val := true :: x, property := hx } = Vector.toList { val := false :: y, property := hy }n: β
x, y: List Bool
hx: List.length (true :: x) = n + 1
hy: List.length (true :: y) = n + 1
h: (bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: x, property := hx }))) else β(Bitvec.toNat (Vector.tail { val := true :: x, property := hx }))) = bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: y, property := hy }))) else β(Bitvec.toNat (Vector.tail { val := true :: y, property := hy }))
a.true.trueVector.toList { val := true :: x, property := hx } = Vector.toList { val := true :: y, property := hy }n: β
x, y: List Bool
hx: List.length (false :: x) = n + 1
hy: List.length (false :: y) = n + 1
h: (Vector.toList β Bitvec.ofNat n) (Bitvec.toNat { val := x, property := (_ : Nat.pred (List.length (false :: x)) = Nat.pred (Nat.succ (n + 0))) }) = (Vector.toList β Bitvec.ofNat n) (Bitvec.toNat { val := y, property := (_ : Nat.pred (List.length (false :: y)) = Nat.pred (Nat.succ (n + 0))) })
a.false.falseVector.toList { val := false :: x, property := hx } = Vector.toList { val := false :: y, property := hy }n: β
x, y: List Bool
hx: List.length (false :: x) = n + 1
hy: List.length (false :: y) = n + 1
h: (bif false then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := false :: x, property := hx }))) else β(Bitvec.toNat (Vector.tail { val := false :: x, property := hx }))) = bif false then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := false :: y, property := hy }))) else β(Bitvec.toNat (Vector.tail { val := false :: y, property := hy }))
a.false.falseVector.toList { val := false :: x, property := hx } = Vector.toList { val := false :: y, property := hy }n: β
x, y: List Bool
hx: List.length (false :: x) = n + 1
hy: List.length (true :: y) = n + 1
h: (bif false then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := false :: x, property := hx }))) else β(Bitvec.toNat (Vector.tail { val := false :: x, property := hx }))) = bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: y, property := hy }))) else β(Bitvec.toNat (Vector.tail { val := true :: y, property := hy }))
a.false.trueVector.toList { val := false :: x, property := hx } = Vector.toList { val := true :: y, property := hy }n: β
x, y: List Bool
hx: List.length (true :: x) = n + 1
hy: List.length (false :: y) = n + 1
h: (bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: x, property := hx }))) else β(Bitvec.toNat (Vector.tail { val := true :: x, property := hx }))) = bif false then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := false :: y, property := hy }))) else β(Bitvec.toNat (Vector.tail { val := false :: y, property := hy }))
a.true.falseVector.toList { val := true :: x, property := hx } = Vector.toList { val := false :: y, property := hy }n: β
x, y: List Bool
hx: List.length (true :: x) = n + 1
hy: List.length (true :: y) = n + 1
h: (bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: x, property := hx }))) else β(Bitvec.toNat (Vector.tail { val := true :: x, property := hx }))) = bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: y, property := hy }))) else β(Bitvec.toNat (Vector.tail { val := true :: y, property := hy }))
a.true.trueVector.toList { val := true :: x, property := hx } = Vector.toList { val := true :: y, property := hy }Goals accomplished! πn: β
x, y: List Bool
hx: List.length (false :: x) = n + 1
hy: List.length (true :: y) = n + 1
h: (bif false then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := false :: x, property := hx }))) else β(Bitvec.toNat (Vector.tail { val := false :: x, property := hx }))) = bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: y, property := hy }))) else β(Bitvec.toNat (Vector.tail { val := true :: y, property := hy }))
a.false.trueVector.toList { val := false :: x, property := hx } = Vector.toList { val := true :: y, property := hy }n: β
x, y: List Bool
hx: List.length (true :: x) = n + 1
hy: List.length (false :: y) = n + 1
h: (bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: x, property := hx }))) else β(Bitvec.toNat (Vector.tail { val := true :: x, property := hx }))) = bif false then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := false :: y, property := hy }))) else β(Bitvec.toNat (Vector.tail { val := false :: y, property := hy }))
a.true.falseVector.toList { val := true :: x, property := hx } = Vector.toList { val := false :: y, property := hy }n: β
x, y: List Bool
hx: List.length (true :: x) = n + 1
hy: List.length (true :: y) = n + 1
h: (bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: x, property := hx }))) else β(Bitvec.toNat (Vector.tail { val := true :: x, property := hx }))) = bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: y, property := hy }))) else β(Bitvec.toNat (Vector.tail { val := true :: y, property := hy }))
a.true.trueVector.toList { val := true :: x, property := hx } = Vector.toList { val := true :: y, property := hy }n: β
x, y: List Bool
hx: List.length (false :: x) = n + 1
hy: List.length (true :: y) = n + 1
h: (bif false then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := false :: x, property := hx }))) else β(Bitvec.toNat (Vector.tail { val := false :: x, property := hx }))) = bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: y, property := hy }))) else β(Bitvec.toNat (Vector.tail { val := true :: y, property := hy }))
a.false.trueVector.toList { val := false :: x, property := hx } = Vector.toList { val := true :: y, property := hy }n: β
x, y: List Bool
hx: List.length (false :: x) = n + 1
hy: List.length (true :: y) = n + 1
h: (bif false then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := false :: x, property := hx }))) else β(Bitvec.toNat (Vector.tail { val := false :: x, property := hx }))) = bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: y, property := hy }))) else β(Bitvec.toNat (Vector.tail { val := true :: y, property := hy }))
a.false.trueVector.toList { val := false :: x, property := hx } = Vector.toList { val := true :: y, property := hy }n: β
x, y: List Bool
hx: List.length (true :: x) = n + 1
hy: List.length (false :: y) = n + 1
h: (bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: x, property := hx }))) else β(Bitvec.toNat (Vector.tail { val := true :: x, property := hx }))) = bif false then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := false :: y, property := hy }))) else β(Bitvec.toNat (Vector.tail { val := false :: y, property := hy }))
a.true.falseVector.toList { val := true :: x, property := hx } = Vector.toList { val := false :: y, property := hy }n: β
x, y: List Bool
hx: List.length (true :: x) = n + 1
hy: List.length (true :: y) = n + 1
h: (bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: x, property := hx }))) else β(Bitvec.toNat (Vector.tail { val := true :: x, property := hx }))) = bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: y, property := hy }))) else β(Bitvec.toNat (Vector.tail { val := true :: y, property := hy }))
a.true.trueVector.toList { val := true :: x, property := hx } = Vector.toList { val := true :: y, property := hy }Goals accomplished! πn: β
x, y: List Bool
hx: List.length (true :: x) = n + 1
hy: List.length (false :: y) = n + 1
h: (bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: x, property := hx }))) else β(Bitvec.toNat (Vector.tail { val := true :: x, property := hx }))) = bif false then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := false :: y, property := hy }))) else β(Bitvec.toNat (Vector.tail { val := false :: y, property := hy }))
a.true.falseVector.toList { val := true :: x, property := hx } = Vector.toList { val := false :: y, property := hy }n: β
x, y: List Bool
hx: List.length (true :: x) = n + 1
hy: List.length (true :: y) = n + 1
h: (bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: x, property := hx }))) else β(Bitvec.toNat (Vector.tail { val := true :: x, property := hx }))) = bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: y, property := hy }))) else β(Bitvec.toNat (Vector.tail { val := true :: y, property := hy }))
a.true.trueVector.toList { val := true :: x, property := hx } = Vector.toList { val := true :: y, property := hy }n: β
x, y: List Bool
hx: List.length (true :: x) = n + 1
hy: List.length (false :: y) = n + 1
h: (bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: x, property := hx }))) else β(Bitvec.toNat (Vector.tail { val := true :: x, property := hx }))) = bif false then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := false :: y, property := hy }))) else β(Bitvec.toNat (Vector.tail { val := false :: y, property := hy }))
a.true.falseVector.toList { val := true :: x, property := hx } = Vector.toList { val := false :: y, property := hy }n: β
x, y: List Bool
hx: List.length (true :: x) = n + 1
hy: List.length (false :: y) = n + 1
h: (bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: x, property := hx }))) else β(Bitvec.toNat (Vector.tail { val := true :: x, property := hx }))) = bif false then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := false :: y, property := hy }))) else β(Bitvec.toNat (Vector.tail { val := false :: y, property := hy }))
a.true.falseVector.toList { val := true :: x, property := hx } = Vector.toList { val := false :: y, property := hy }n: β
x, y: List Bool
hx: List.length (true :: x) = n + 1
hy: List.length (true :: y) = n + 1
h: (bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: x, property := hx }))) else β(Bitvec.toNat (Vector.tail { val := true :: x, property := hx }))) = bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: y, property := hy }))) else β(Bitvec.toNat (Vector.tail { val := true :: y, property := hy }))
a.true.trueVector.toList { val := true :: x, property := hx } = Vector.toList { val := true :: y, property := hy }Goals accomplished! πn: β
x, y: List Bool
hx: List.length (true :: x) = n + 1
hy: List.length (true :: y) = n + 1
h: (bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: x, property := hx }))) else β(Bitvec.toNat (Vector.tail { val := true :: x, property := hx }))) = bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: y, property := hy }))) else β(Bitvec.toNat (Vector.tail { val := true :: y, property := hy }))
a.true.trueVector.toList { val := true :: x, property := hx } = Vector.toList { val := true :: y, property := hy }n: β
x, y: List Bool
hx: List.length (true :: x) = n + 1
hy: List.length (true :: y) = n + 1
h: (bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: x, property := hx }))) else β(Bitvec.toNat (Vector.tail { val := true :: x, property := hx }))) = bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: y, property := hy }))) else β(Bitvec.toNat (Vector.tail { val := true :: y, property := hy }))
a.true.trueVector.toList { val := true :: x, property := hx } = Vector.toList { val := true :: y, property := hy }n: β
x, y: List Bool
hx: List.length (true :: x) = n + 1
hy: List.length (true :: y) = n + 1
h: (bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: x, property := hx }))) else β(Bitvec.toNat (Vector.tail { val := true :: x, property := hx }))) = bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: y, property := hy }))) else β(Bitvec.toNat (Vector.tail { val := true :: y, property := hy }))
a.true.trueVector.toList { val := true :: x, property := hx } = Vector.toList { val := true :: y, property := hy }n: β
x, y: List Bool
hx: List.length (true :: x) = n + 1
hy: List.length (true :: y) = n + 1
h: Bitvec.toNat (Bitvec.not { val := x, property := (_ : Nat.pred (List.length (true :: x)) = Nat.pred (Nat.succ (n + 0))) }) = Bitvec.toNat (Bitvec.not { val := y, property := (_ : Nat.pred (List.length (true :: y)) = Nat.pred (Nat.succ (n + 0))) })
a.true.trueVector.toList { val := true :: x, property := hx } = Vector.toList { val := true :: y, property := hy }n: β
x, y: List Bool
hx: List.length (true :: x) = n + 1
hy: List.length (true :: y) = n + 1
h: (bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: x, property := hx }))) else β(Bitvec.toNat (Vector.tail { val := true :: x, property := hx }))) = bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: y, property := hy }))) else β(Bitvec.toNat (Vector.tail { val := true :: y, property := hy }))
a.true.trueVector.toList { val := true :: x, property := hx } = Vector.toList { val := true :: y, property := hy }n: β
x, y: List Bool
hx: List.length (true :: x) = n + 1
hy: List.length (true :: y) = n + 1
h: (Vector.toList β Bitvec.ofNat n) (Bitvec.toNat (Bitvec.not { val := x, property := (_ : Nat.pred (List.length (true :: x)) = Nat.pred (Nat.succ (n + 0))) })) = (Vector.toList β Bitvec.ofNat n) (Bitvec.toNat (Bitvec.not { val := y, property := (_ : Nat.pred (List.length (true :: y)) = Nat.pred (Nat.succ (n + 0))) }))
a.true.trueVector.toList { val := true :: x, property := hx } = Vector.toList { val := true :: y, property := hy }n: β
x, y: List Bool
hx: List.length (true :: x) = n + 1
hy: List.length (true :: y) = n + 1
h: (bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: x, property := hx }))) else β(Bitvec.toNat (Vector.tail { val := true :: x, property := hx }))) = bif true then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail { val := true :: y, property := hy }))) else β(Bitvec.toNat (Vector.tail { val := true :: y, property := hy }))
a.true.trueVector.toList { val := true :: x, property := hx } = Vector.toList { val := true :: y, property := hy }Goals accomplished! πtheoremGoals accomplished! πtoInt_zero {toInt_zero: β {w : β}, Bitvec.toInt 0 = 0w :w: βNat} : (Nat: Type0 : Bitvec0: ?m.337976w).toInt =w: β0 :=0: ?m.338008Goals accomplished! πw: βBitvec.toInt 0 = 0w: β(match w, 0 with | 0, x => 0 | Nat.succ n, v => bif Vector.head v then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail v))) else β(Bitvec.toNat (Vector.tail v))) = 0w: βBitvec.toInt 0 = 0
zero(match Nat.zero, 0 with | 0, x => 0 | Nat.succ n, v => bif Vector.head v then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail v))) else β(Bitvec.toNat (Vector.tail v))) = 0w: β
succ(match Nat.succ w, 0 with | 0, x => 0 | Nat.succ n, v => bif Vector.head v then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail v))) else β(Bitvec.toNat (Vector.tail v))) = 0w: βBitvec.toInt 0 = 0
zero(match Nat.zero, 0 with | 0, x => 0 | Nat.succ n, v => bif Vector.head v then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail v))) else β(Bitvec.toNat (Vector.tail v))) = 0
zero(match Nat.zero, 0 with | 0, x => 0 | Nat.succ n, v => bif Vector.head v then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail v))) else β(Bitvec.toNat (Vector.tail v))) = 0w: β
succ(match Nat.succ w, 0 with | 0, x => 0 | Nat.succ n, v => bif Vector.head v then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail v))) else β(Bitvec.toNat (Vector.tail v))) = 0Goals accomplished! πw: βBitvec.toInt 0 = 0w: β
succ(match Nat.succ w, 0 with | 0, x => 0 | Nat.succ n, v => bif Vector.head v then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail v))) else β(Bitvec.toNat (Vector.tail v))) = 0w: β
succ(match Nat.succ w, 0 with | 0, x => 0 | Nat.succ n, v => bif Vector.head v then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail v))) else β(Bitvec.toNat (Vector.tail v))) = 0
succ(match Nat.succ w, 0 with | 0, x => 0 | Nat.succ n, v => bif Vector.head v then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail v))) else β(Bitvec.toNat (Vector.tail v))) = 0w: β
succ(match Nat.succ w, 0 with | 0, x => 0 | Nat.succ n, v => bif Vector.head v then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail v))) else β(Bitvec.toNat (Vector.tail v))) = 0
succ(match Nat.succ w, 0 with | 0, x => 0 | Nat.succ n, v => bif Vector.head v then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail v))) else β(Bitvec.toNat (Vector.tail v))) = 0w: β
succ(match Nat.succ w, 0 with | 0, x => 0 | Nat.succ n, v => bif Vector.head v then Int.negSucc (Bitvec.toNat (Bitvec.not (Vector.tail v))) else β(Bitvec.toNat (Vector.tail v))) = 0@[simp] theorem toInt_eq_zero {Goals accomplished! πw :w: βNat} (Nat: Typeb : Bitvecb: Bitvec ww) :w: βb.toInt =b: Bitvec w0 β0: ?m.340676b =b: Bitvec w0 :=0: ?m.340702Goals accomplished! πBitvec.toInt b = 0 β Bitvec.toInt b = Bitvec.toInt 0Bitvec.toInt b = 0 β Bitvec.toInt b = 0theoremGoals accomplished! πtoInt_one : β {toInt_one: β {w : β}, 1 < w β Bitvec.toInt 1 = 1w :w: ββ} (β: Type_hw :_hw: 1 < w1 <1: ?m.340812w), Bitvec.toInt (w: β1 : Bitvec1: ?m.340851w) =w: β1 |1: ?m.340876w+2, _ =>w: βGoals accomplished! πBitvec.toInt 1 = 1Bitvec.toInt 1 = 1Bitvec.toInt 1 = 1Bitvec.toInt 1 = 1Bitvec.toInt 1 = 1-- from InstCombine/:805 theorem {Goals accomplished! πw :w: βNat} {Nat: Typex : Bitvecx: Bitvec ww} (w: βhw :hw: w > 1w >w: β1) (1: ?m.343603hx :hx: x β 0x βx: Bitvec w0) : Bitvec.sdiv?0: ?m.34363611: ?m.343664x = Option.some (Bitvec.select (((x: Bitvec wx +x: Bitvec w1).toNat <1: ?m.3437003) ::α΅₯ Vector.nil)3: ?m.343776xx: Bitvec w0) :=0: ?m.343831Goals accomplished! πGoals accomplished! πGoals accomplished! πend BitvecGoals accomplished! π